Add version string to start output

This commit is contained in:
kolaente 2020-09-15 18:38:34 +02:00
parent d108f31402
commit 4181d8fac6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 1 deletions

View File

@ -144,7 +144,7 @@ func initVars() {
setPkgVersion()
setApiPackages()
setGoFiles()
//Ldflags = `-X "` + PACKAGE + `/pkg/version.Version=` + VersionNumber + `" -X "main.Tags=` + Tags + `"`
Ldflags = `-X "main.VersionNum=` + VersionNumber + `" -X "main.Tags=` + Tags + `"`
}
func runAndStreamOutput(cmd string, args ...string) {

View File

@ -12,6 +12,8 @@ import (
"strings"
)
var VersionNum = "dev"
func handleErr(format string, args ...interface{}) {
fmt.Printf(format, args...)
os.Exit(1)
@ -25,6 +27,8 @@ func readText() (text string, err error) {
func main() {
fmt.Printf("Bulk QR Code generate tool, Version %s\n\r", VersionNum)
// 1. Get directory
cwd, err := os.Getwd()
if err != nil {