-
Notifications
You must be signed in to change notification settings - Fork 27
/
Taskfile.yml
86 lines (74 loc) · 2.84 KB
/
Taskfile.yml
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
76
77
78
79
80
81
82
83
84
85
86
version: "3"
vars:
ROOT_DIR:
sh: git rev-parse --show-toplevel
tasks:
clean:
internal: true
cmds:
- rm -rf .task
- rm -rf pkg/design/node_modules
- rm -rf .out
# ╭──────────────────────────────────────────────────╮
# │ Generate Commands │
# ╰──────────────────────────────────────────────────╯
gen:tailwind:
cmds:
- cd ./pkg/webapp && bun run build
- cp ./pkg/webapp/components/styles/styles.css ./cmd/hway/styles.css
gen:pkl:
sources:
- pkl/base.types/Ctx.pkl
- pkl/base.types/DWN.pkl
- pkl/base.types/ORM.pkl
cmds:
- for: sources
cmd: go run github.com/apple/pkl-go/cmd/pkl-gen-go {{ .ITEM }}
- task: clean
gen:templ:
cmds:
- templ generate
# ╭──────────────────────────────────────────────────╮
# │ Build Commands │
# ╰──────────────────────────────────────────────────╯
build:motr:
env:
GOOS: js
GOARCH: wasm
cmds:
- go build -o build/app.wasm ./cmd/motr/main.go
build:hway:
cmds:
- task: gen:tailwind
- task: gen:templ
- go build -o build/hway ./cmd/hway/main.go
# ╭──────────────────────────────────────────────────╮
# │ Serve Commands │
# ╰──────────────────────────────────────────────────╯
serve:hway:
cmds:
- task: build:hway
- ./build/hway
# ╭──────────────────────────────────────────────────╮
# │ Deploy Commands │
# ╰──────────────────────────────────────────────────╯
deploy:buf:
dir: proto
cmds:
- bunx buf dep update
- bunx buf build
- bunx buf push
deploy:hway:
dir: cmd/hway
cmds:
- task: gen:design
- bunx wrangler deploy
deploy:pkl:
cmds:
- bunx pkl project package pkl/*/
- |
for dir in .out/*/; do
folder=$(basename "$dir")
rclone copy "$dir" "r2:pkljar/$folder"
done
- task: clean