aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 53b076749dac0fd0399fed31a3857ea3c338db01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 .

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
	sassc \
		-I scss scss/main.scss static/main.css

tmpl:
	cd ./templates && \
	qtc *

.PHONY: sass