aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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