-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
75 lines (63 loc) · 1.42 KB
/
Taskfile.yml
File metadata and controls
75 lines (63 loc) · 1.42 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3"
env:
STATIC_DIR: "web/resources/static"
tasks:
# The `build:` tasks below are used together for production builds of a project
build:templ:
cmds:
- go tool templ generate
sources:
- "**/*.templ"
generates:
- "**/*_templ.go"
build:web:
cmds:
- go run cmd/web/build/main.go
sources:
- "./web/libs/**/**/*.{html,css,ts}"
generates:
- "{{.STATIC_DIR}}/libs/**"
build:
cmds:
- go build -tags=prod -o bin/main ./cmd/web
deps:
- build:templ
- build:web
# Use this task to debug with the delve debugger
debug:
cmds:
- dlv exec ./bin/main
deps:
- build
# Use this task to download latest version of client libs
download:
cmds:
- go run cmd/downloader/main.go
# The `live:` tasks below are used together for development builds and will live-reload the server
live:templ:
cmds:
- go tool templ generate -watch
live:web:
cmds:
- go run cmd/web/build/main.go -watch
live:server:
cmds:
- |
go tool air \
-build.cmd "go build -tags=dev -o tmp/bin/main ./cmd/web" \
-build.bin "tmp/bin/main" \
-build.include_ext "go,templ" \
-misc.clean_on_exit "true"
live:
deps:
- live:templ
- live:server
- live:web
run:
cmds:
- ./bin/main
deps:
- build
default:
cmds:
- task: live