fix: report actual version instead of hardcoded 3.0.0-dev
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

- Add version variable to main.go, set via -X ldflags at build time
- Pass version through to Server, used in the / endpoint response
- Makefile passes VERSION from git describe
- Dockerfile accepts VERSION build arg
- Woodpecker passes CI_COMMIT_TAG as VERSION
This commit is contained in:
2026-06-27 00:47:52 +10:00
parent 8ec7de50e3
commit ab2b7ed5ac
5 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ check-go:
fi
build: check-go tidy
go build -ldflags="-s -w" -o $(BINARY) ./cmd/artifactapi
go build -ldflags="-s -w -X main.version=$(VERSION)" -o $(BINARY) ./cmd/artifactapi
test: check-go
go test -race -count=1 ./pkg/... ./internal/...