Merge branch 'main' into main

This commit is contained in:
Matt Spurrier 2024-03-30 21:53:30 +08:00 committed by GitHub
commit 6852f53da4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 3 deletions

View file

@ -18,6 +18,8 @@ builds:
- linux
goarch:
- amd64
ldflags:
- -s -w -X version.Version={{ .Tag }}
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags:
- -s -w -X github.com/HikariKnight/quickpassthrough/internal/version.Version={{.Version}}

View file

@ -5,6 +5,8 @@ import (
"os"
"github.com/HikariKnight/quickpassthrough/internal/configs"
"github.com/HikariKnight/quickpassthrough/internal/logger"
"github.com/HikariKnight/quickpassthrough/internal/version"
"github.com/HikariKnight/quickpassthrough/pkg/command"
"github.com/HikariKnight/quickpassthrough/pkg/menu"
"github.com/gookit/color"
@ -17,7 +19,8 @@ func Welcome() {
// Write title
title := color.New(color.BgHiBlue, color.White, color.Bold)
title.Println("Welcome to Quickpassthrough!")
title.Printf("Welcome to Quickpassthrough %s!\n", version.Version)
logger.Printf("Welcome to Quickpassthrough %s!\n", version.Version)
// Write welcome message
color.Print(

View file

@ -48,9 +48,15 @@ func NewParams() *Params {
parser := argparse.NewParser("quickpassthrough", "A utility to help you configure your host for GPU Passthrough")
// Configure arguments
gui := parser.Flag("g", "gui", &argparse.Options{
/*gui := parser.Flag("g", "gui", &argparse.Options{
Required: false,
Help: "Launch GUI (placeholder for now)",
})*/
// Add version flag
version := parser.Flag("v", "version", &argparse.Options{
Required: false,
Help: "Display version",
})
version := parser.Flag("v", "version", &argparse.Options{