File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,9 @@ builds:
1818 - linux
1919 goarch :
2020 - amd64
21- ldflags :
22- - -s -w -X version.Version={{ .Tag }}
2321 mod_timestamp : " {{ .CommitTimestamp }}"
24-
22+ ldflags :
23+ - -s -w -X github.com/HikariKnight/quickpassthrough/internal/version.Version={{.Version}}
2524archives :
2625 - format : tar.gz
2726 # this name template makes the OS and Arch compatible with the results of `uname`.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
22
33import (
44 "fmt"
5+ "os"
56
67 internal "github.com/HikariKnight/quickpassthrough/internal"
78 downloader "github.com/HikariKnight/quickpassthrough/internal/ls_iommu_downloader"
@@ -13,9 +14,13 @@ func main() {
1314 // Get all our arguments in 1 neat struct
1415 pArg := params .NewParams ()
1516
17+ // Display the version
1618 if pArg .Flag ["version" ] {
17- fmt .Printf ("Quickpassthrough version: %s\n " , version .Version )
18- } else {
19+ fmt .Printf ("QuickPassthrough Version %s\n " , version .Version )
20+ os .Exit (0 )
21+ }
22+
23+ if ! pArg .Flag ["gui" ] {
1924 downloader .CheckLsIOMMU ()
2025 internal .Tui ()
2126 }
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func NewParams() *Params {
5656 // Add version flag
5757 version := parser .Flag ("v" , "version" , & argparse.Options {
5858 Required : false ,
59- Help : "Display version" ,
59+ Help : "Display the version" ,
6060 })
6161
6262 // Parse arguments
@@ -78,9 +78,9 @@ func NewParams() *Params {
7878 }
7979
8080 // Add all parsed arguments to a struct for portability since we will use them all over the program
81+ pArg .addFlag ("gui" , * gui )
8182 pArg .addFlag ("version" , * version )
82- /*pArg.addFlag("gui", *gui)
83- pArg.addFlag("gpu", *gpu)
83+ /*pArg.addFlag("gpu", *gpu)
8484 pArg.addFlag("usb", *usb)
8585 pArg.addFlag("nic", *nic)
8686 pArg.addFlag("sata", *sata)
You can’t perform that action at this time.
0 commit comments