SLUG ?= $(shell git rev-parse --short HEAD) LDFLAGS := "-X 'git.gabrielgio.me/cerrado/templates.Slug=.$(SLUG)' -s -w" build: sass-slug tmpl go build \ -ldflags=$(LDFLAGS) \ -o bin/cerrado run: sass tmpl go run . test: go test -v --tags=unit ./... # this is meant for "prod" build sass-slug: mkdir -p static sassc \ --style compressed \ -I scss scss/main.scss static/main.$(SLUG).css sass: mkdir -p static sassc \ -I scss scss/main.scss static/main.css tmpl: cd ./templates && \ qtc * .PHONY: sass