refactor: remove VERSION.txt, use git tags for version identification, defaulting

This commit is contained in:
2025-08-01 14:09:47 -05:00
parent 4bacef7bb9
commit 5bb9f327dc
4 changed files with 28 additions and 24 deletions

View File

@@ -1,12 +1,12 @@
version: '3'
version: "3"
vars:
BINARY_NAME: '{{.APP_NAME}}'
BINARY_NAME: "{{.APP_NAME}}"
tasks:
build:
cmds:
- go build -ldflags "-X main.Version=$(cat VERSION.txt) -X main.Commit=$(git rev-parse --short HEAD) -X 'main.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)'" -o ./bin/{{.BINARY_NAME}} ./cmd/main.go
- go build -ldflags "-X main.Version=$(git describe --tags --abbrev=0 2>/dev/null || echo 'unknown') -X main.Commit=$(git rev-parse --short HEAD) -X 'main.BuildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)'" -o ./bin/{{.BINARY_NAME}} ./cmd/main.go
service:
desc: "Install the service"
@@ -30,4 +30,4 @@ tasks:
tail:
desc: "Tail the log file"
cmds:
- journalctl --user-unit HATray.service -ef
- journalctl --user-unit HATray.service -ef