aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2025-08-07 18:00:34 +0100
committerLeonardo Bishop <me@leonardobishop.net>2025-08-07 19:05:54 +0100
commitf38b2c15ae796ade9f9779974dc5c237597b0829 (patch)
treeb7116a9d1b631c3ad87a235870c60d7fffbcd46a /Makefile
parent0d47544d12656be9eb853f8323f0da19eec2316c (diff)
Set version information at buildpackaging
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 93f2b71..a3300fb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,12 @@
.PHONY: dockerBuild
+VERSION := $(shell git describe --tags --abbrev=7 | sed "s/^v//")
+
+all: build
+
build: templates
mkdir -p bin
- go build -o bin/walrss github.com/codemicro/walrss/walrss
+ go build -ldflags "-X 'github.com/codemicro/walrss/walrss/internal/core.Version=${VERSION}'" -o bin/walrss github.com/codemicro/walrss/walrss
run: build
mkdir -p run