-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
51 lines (41 loc) · 1014 Bytes
/
taskfile.yaml
File metadata and controls
51 lines (41 loc) · 1014 Bytes
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
version: "3"
dotenv: [.env]
tasks:
migrate:
dotenv:
- .env
cmds:
- migrate -database {{ .PG_DSN }} -path db/migrations force 1
- migrate -database {{ .PG_DSN }} -path db/migrations -verbose up
new-migrate:
- migrate create -ext sql -dir db/migrations -seq {{ .NAME }}
build:
sources:
- "go.mod"
- "*.go"
generates:
- ./dist/app.exe
cmds:
- go build -tags dev -o dist/app.exe
dev:
cmds:
- go build -tags dev -o dist/app.exe
- ./dist/app.exe
format:
cmds:
- gofmt -s -w .
- templ fmt templates/
gen:template:
sources:
- "templates/*.templ"
generates:
- "templates/*.go"
cmds:
- go tool github.com/a-h/templ/cmd/templ generate -path templates/
gen:
cmds:
- sqlc generate
watch:template:
cmd: watchexec --shell=none -e templ -w . -r -- task gen:template --force
watch:dev:
cmd: watchexec --shell=none -e go,mod -w . -w templates -r -- task dev