update for globally accesible version number
This commit is contained in:
parent
ee45d29e6f
commit
9a8e1002cd
3 changed files with 13 additions and 2 deletions
|
@ -16,11 +16,11 @@ builds:
|
|||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
|
||||
goarch:
|
||||
- amd64
|
||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||
|
||||
ldflags:
|
||||
- -s -w -X version.Version={{.Version}}
|
||||
archives:
|
||||
- format: tar.gz
|
||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
internal "github.com/HikariKnight/quickpassthrough/internal"
|
||||
downloader "github.com/HikariKnight/quickpassthrough/internal/ls_iommu_downloader"
|
||||
"github.com/HikariKnight/quickpassthrough/internal/params"
|
||||
"github.com/HikariKnight/quickpassthrough/internal/version"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Get all our arguments in 1 neat struct
|
||||
pArg := params.NewParams()
|
||||
|
||||
// Display the version
|
||||
if p.Arg.Flag["version"] {
|
||||
fmt.Printf("QuickPassthrough Version %s\n", version.Version)
|
||||
}
|
||||
|
||||
if !pArg.Flag["gui"] {
|
||||
downloader.CheckLsIOMMU()
|
||||
internal.Tui()
|
||||
|
|
3
internal/version/version.go
Normal file
3
internal/version/version.go
Normal file
|
@ -0,0 +1,3 @@
|
|||
package version
|
||||
|
||||
type Version string
|
Loading…
Add table
Add a link
Reference in a new issue