diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | global.ha | 2 |
3 files changed, 10 insertions, 4 deletions
@@ -1,2 +1,3 @@ /forge -/templates.ha +/.templates.ha +/.version.ha @@ -1,5 +1,10 @@ -forge: templates.ha *.ha +forge: .version.ha .templates.ha *.ha hare build $(HAREFLAGS) -o $@ . -templates.ha: templates/*.htmpl +.templates.ha: templates/*.htmpl htmplgen -o $@ $^ + +.version.ha: + printf 'def VERSION="%s";\n' $(shell git describe --tags --always --dirty) > $@ + +.PHONY: version.ha @@ -5,7 +5,7 @@ let global: struct { ssh_fp: str, } = struct { title: str = "Test Forge", - version: str = "v0.0.0", + version: str = VERSION, ssh_pubkey: str = "pubkey", ssh_fp: str = "fp", }; |