aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..227cef9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+.PHONY: clean
+
+forge: $(filter-out forge,$(wildcard *)) version.go
+ go build -o $@
+
+version.go:
+ printf 'package main\nconst VERSION="%s"\n' $(shell git describe --tags --long --always --dirty) > $@
+
+clean:
+ $(RM) forge version.go
+