add --version flag

ensure version is injected at build time in makefile/taskfile
This commit is contained in:
2026-02-16 00:55:17 +00:00
parent 3be7ddb36b
commit c4e2dacee9
3 changed files with 29 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ BIN_DIR := bin
WINDOWS=$(BIN_DIR)/$(PROGRAM)_windows_amd64.exe
LINUX=$(BIN_DIR)/$(PROGRAM)_linux_amd64
MACOS=$(BIN_DIR)/$(PROGRAM)_darwin_amd64
VERSION=$(shell git log -n 1 --format=%h)
VERSION=$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
.DEFAULT_GOAL := build