-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 828 Bytes
/
Makefile
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
30
31
32
33
34
35
36
37
all: static/main.css periwiki
gosources := $(wildcard *.go) $(wildcard **/*.go) go.sum go.mod
static/main.css: src/main.scss
sass src/main.scss static/main.css
.bin:
mkdir -p .bin
.bin/sqlboiler: .bin
GOBIN=$(shell pwd)/.bin go install github.com/volatiletech/sqlboiler/v4@latest
.bin/sqlboiler-sqlite3: .bin
GOBIN=$(shell pwd)/.bin go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-sqlite3@latest
db/skeleton.db: db/schema.sql
rm -f db/skeleton.db
sqlite3 -init db/schema.sql db/skeleton.db ""
model: db/skeleton.db sqlboiler.toml .bin/sqlboiler .bin/sqlboiler-sqlite3
PATH="$(shell pwd)/.bin:$(PATH)" go generate
periwiki: model $(gosources)
go build
run: periwiki
./periwiki
test: model
go test -v ./...
clean:
rm -rf .bin
rm -rf db/skeleton.db
rm -rf model
.PHONY: all run test clean