diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,5 +1,10 @@ -build: sass tmpl - go build -o bin/cerrado +COMMIT := $(shell git rev-parse --short HEAD) +LDFLAGS := "-X 'git.gabrielgio.me/cerrado/templates.Slug=.$(COMMIT)' -s -w" + +build: sass-slug tmpl + go build \ + -ldflags=$(LDFLAGS) \ + -o bin/cerrado run: sass tmpl go run . @@ -7,8 +12,13 @@ run: sass tmpl test: go test -v --tags=unit ./... +sass-slug: + mkdir -p static + sassc \ + -I scss scss/main.scss static/main.$(COMMIT).css + sass: - @mkdir -p static + mkdir -p static sassc \ -I scss scss/main.scss static/main.css |