-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (38 loc) · 925 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
38
39
40
41
42
43
44
45
.PHONY: fromprod
fromprod:
curl -o garden_prod.db http://garden/.magic/db
curl -o images_prod.tgz http://garden/.magic/images
make reset
.PHONY: reset
reset:
rm -f garden_dev.db*
cp -f garden_prod.db garden_dev.db
rm -rf images
tar xf images_prod.tgz
make live
.PHONY: dev
dev:
go tool sqlc generate
go tool templ generate
tailwindcss -i style.css -o static/app.css
go run .
.PHONY: live
live:
go run ./cmd/watch
.PHONY: bin
bin:
go build -o garden.bin -tags=osusergo,netgo,sqlite_stat4,sqlite_omit_load_extension,sqlite_fts5,sqlite_json,sqlite_math_functions -ldflags=-extldflags=-static
.PHONY: schema
schema:
sqlite3 garden_dev.db ".schema"
.PHONY: sqlite
sqlite:
sqlite3 garden_dev.db
.PHONY: deploy
deploy:
go tool sqlc generate
go tool templ generate
tailwindcss -i style.css -o static/app.css
make bin
rsync garden.bin acrux:/fast/garden/garden.bin
ssh root@acrux systemctl restart garden