mirror of
https://github.com/Xevion/HATray.git
synced 2025-12-05 23:15:09 -06:00
feat: include git commit & build date information in builds
This commit is contained in:
@@ -6,7 +6,7 @@ vars:
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -o ./bin/{{.BINARY_NAME}} ./cmd/main.go
|
||||
- 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
|
||||
|
||||
service:
|
||||
desc: "Install the service"
|
||||
|
||||
@@ -6,7 +6,7 @@ vars:
|
||||
tasks:
|
||||
build:
|
||||
cmds:
|
||||
- go build -ldflags "-X main.Version=$(Get-Content VERSION.txt)" -o ./bin/{{.BINARY_NAME}} ./cmd/main.go
|
||||
- go build -ldflags "-X main.Version=$(Get-Content VERSION.txt) -X main.Commit=$(git rev-parse --short HEAD) -X 'main.BuildDate=$(Get-Date -Format yyyy-MM-ddTHH:mm:ssZ)'" -o ./bin/{{.BINARY_NAME}} ./cmd/main.go
|
||||
|
||||
service:
|
||||
desc: "Install the service"
|
||||
|
||||
Reference in New Issue
Block a user