make the version an ldflag
This commit is contained in:
parent
e825cffc8a
commit
2c1cd3343b
6
Makefile
6
Makefile
|
@ -1,3 +1,5 @@
|
||||||
|
VERSION = $(shell git describe --tags)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
./guireleaser
|
./guireleaser
|
||||||
|
|
||||||
|
@ -14,7 +16,8 @@ build:
|
||||||
echo "build it!"
|
echo "build it!"
|
||||||
-rm resources/*.so
|
-rm resources/*.so
|
||||||
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
||||||
GO111MODULE=off go build -v -x
|
GO111MODULE=off go build -v -x -ldflags " \
|
||||||
|
-X main.VERSION=${VERSION}"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
rm -f ~/go/src/go.wit.com/toolkits/*.so
|
rm -f ~/go/src/go.wit.com/toolkits/*.so
|
||||||
|
@ -28,4 +31,3 @@ redomod:
|
||||||
rm -f go.*
|
rm -f go.*
|
||||||
GO111MODULE= go mod init
|
GO111MODULE= go mod init
|
||||||
GO111MODULE= go mod tidy
|
GO111MODULE= go mod tidy
|
||||||
|
|
||||||
|
|
4
main.go
4
main.go
|
@ -10,6 +10,8 @@ import (
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var VERSION string
|
||||||
|
|
||||||
// TODO: autocompute these in the gui
|
// TODO: autocompute these in the gui
|
||||||
var releaseReasonS string
|
var releaseReasonS string
|
||||||
var releaseVersion string
|
var releaseVersion string
|
||||||
|
@ -41,7 +43,7 @@ func main() {
|
||||||
me.myGui.Default()
|
me.myGui.Default()
|
||||||
|
|
||||||
// our main window
|
// our main window
|
||||||
me.mainWindow = me.myGui.NewWindow("GUI release manager")
|
me.mainWindow = me.myGui.NewWindow("GUI release manager " + VERSION)
|
||||||
me.mainBox = me.mainWindow.NewBox("bw hbox", true)
|
me.mainBox = me.mainWindow.NewBox("bw hbox", true)
|
||||||
|
|
||||||
// sanity check of things that might be around that mess
|
// sanity check of things that might be around that mess
|
||||||
|
|
Loading…
Reference in New Issue