-
Notifications
You must be signed in to change notification settings - Fork 97
/
Makefile
59 lines (45 loc) · 1.14 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
APP_NAME ?= app
.PHONY: vet
vet:
go vet ./...
.PHONY: staticcheck
staticcheck:
staticcheck ./...
.PHONY: test
test:
go test -race -v -timeout 30s ./...
.PHONY: tailwind-watch
tailwind-watch:
tailwindcss -i ./static/css/input.css -o ./static/css/style.css --watch
.PHONY: tailwind-build
tailwind-build:
tailwindcss -i ./static/css/input.css -o ./static/css/style.min.css --minify
.PHONY: templ-watch
templ-watch:
templ generate --watch
.PHONY: templ-generate
templ-generate:
templ generate
.PHONY: dev
dev:
go build -o ./tmp/main ./cmd/main.go && air
.PHONY: build
build:
make tailwind-build
make templ-generate
go build -ldflags "-X main.Environment=production" -o ./bin/$(APP_NAME) ./cmd/main.go
.PHONY: docker-build
docker-build:
docker-compose -f ./dev/docker-compose.yml build
.PHONY: docker-up
docker-up:
docker-compose -f ./dev/docker-compose.yml up
.PHONY: docker-dev
docker-dev:
docker-compose -f ./dev/docker-compose.yml -f ./dev/docker-compose.dev.yml up
.PHONY: docker-down
docker-down:
docker-compose -f ./dev/docker-compose.yml down
.PHONY: docker-clean
docker-clean:
docker-compose -f ./dev/docker-compose.yml down -v --rmi all