feat: bake version into binary and display in UI sidebar
- Inject VERSION via ldflags (-X main=web.Version=) and git short SHA
- Add /api/version endpoint returning {version, commit}
- Display version in Layout sidebar footer (v0.1.6 · 8cfd405)
- Add AGENTS.md section documenting SemVer policy and bump-before-push rule
- Bump VERSION 0.1.5 -> 0.1.6 in Makefile
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
BINARY=nasctl
|
||||
VERSION?=0.1.5
|
||||
VERSION?=0.1.6
|
||||
GO?=go
|
||||
LDFLAGS=-s -w
|
||||
LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||
BUILD_FLAGS=CGO_ENABLED=0
|
||||
|
||||
.PHONY: build build-all frontend run package clean tidy test
|
||||
|
||||
Reference in New Issue
Block a user