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 - linux
goarch: goarch:
- amd64 - amd64
ldflags:
- -s -w -X version.Version={{ .Tag }}
mod_timestamp: "{{ .CommitTimestamp }}" mod_timestamp: "{{ .CommitTimestamp }}"
ldflags: ldflags:
- -s -w -X github.com/HikariKnight/quickpassthrough/internal/version.Version={{.Version}} - -s -w -X github.com/HikariKnight/quickpassthrough/internal/version.Version={{.Version}}

View file

@ -5,6 +5,8 @@ import (
"os" "os"
"github.com/HikariKnight/quickpassthrough/internal/configs" "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/command"
"github.com/HikariKnight/quickpassthrough/pkg/menu" "github.com/HikariKnight/quickpassthrough/pkg/menu"
"github.com/gookit/color" "github.com/gookit/color"
@ -17,7 +19,8 @@ func Welcome() {
// Write title // Write title
title := color.New(color.BgHiBlue, color.White, color.Bold) 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 // Write welcome message
color.Print( 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") parser := argparse.NewParser("quickpassthrough", "A utility to help you configure your host for GPU Passthrough")
// Configure arguments // Configure arguments
gui := parser.Flag("g", "gui", &argparse.Options{ /*gui := parser.Flag("g", "gui", &argparse.Options{
Required: false, Required: false,
Help: "Launch GUI (placeholder for now)", 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{ version := parser.Flag("v", "version", &argparse.Options{