Somewhat better version handling
This commit is contained in:
parent
e7596e41f7
commit
f5de8d1f37
5 changed files with 19 additions and 12 deletions
|
|
@ -1,7 +1,10 @@
|
|||
NAME = rexclient
|
||||
|
||||
VERSION_FILE := ../VERSION.txt
|
||||
REX_VERSION ?= $(shell cat $(VERSION_FILE))
|
||||
|
||||
build: commit.txt
|
||||
go build -tags no_emoji -trimpath -ldflags="-s -w" -buildvcs=false -o $(NAME)
|
||||
go build -tags no_emoji -trimpath -ldflags="-s -w -X main.rex_version=$(REX_VERSION)" -buildvcs=false -o $(NAME)
|
||||
|
||||
run: commit.txt
|
||||
go run .
|
||||
|
|
|
|||
|
|
@ -15,13 +15,11 @@ import (
|
|||
model "rex_model"
|
||||
)
|
||||
|
||||
//go:generate sh -c "printf %s $(git rev-parse --short HEAD) > commit.txt"
|
||||
//go:embed commit.txt
|
||||
var git_rev string
|
||||
var rex_version = "UNDEFINED"
|
||||
|
||||
func main() {
|
||||
a := app.New()
|
||||
w := a.NewWindow(fmt.Sprintf("RexForge %s", strings.ToUpper(git_rev)))
|
||||
w := a.NewWindow(fmt.Sprintf("RexForge %s", strings.ToUpper(rex_version)))
|
||||
w.Resize(fyne.NewSize(900, 600))
|
||||
|
||||
addons := model.AddonIndex
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue