-
Notifications
You must be signed in to change notification settings - Fork 94
/
Taskfile.yml
74 lines (73 loc) · 2.46 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
version: "3"
tasks:
build:
cmds:
- task: protos
- task: embed
- task: pipeline
protos:
cmds:
- |
protoc --experimental_allow_proto3_optional \
--go_out=module=github.com/genshinsim/gcsim:. \
--go-grpc_out=module=github.com/genshinsim/gcsim:. \
--plugin=./ui/node_modules/.bin/protoc-gen-ts_proto \
--ts_proto_opt=useOptionals=all \
--ts_proto_opt=snakeToCamel=json \
--ts_proto_out=./ui/packages/types/src/generated \
--ts_proto_opt=esModuleInterop=true \
--ts_proto_opt=useJsonName=true \
--ts_proto_opt=outputIndex=true \
protos/**/*.proto
- go run scripts/bsontags/main.go -dir ./pkg/model -verbose
- go run scripts/bsontags/main.go -dir ./backend/pkg/services/db -verbose
- go run scripts/bsontags/main.go -dir ./backend/pkg/services/share -verbose
- task: msgp
# - task: protos-to-ts
msgp:
dir: ./pkg/stats
cmds:
- go generate
embed:
cmds:
- sh -c "scripts/build_preview.sh"
pipeline:
cmds:
- go run pipeline/cmd/generate/main.go --gen-char --gen-weap --gen-art --gen-enemies
pipeline-avatars:
cmds:
- go run pipeline/cmd/generate/main.go --gen-char
pipeline-weapons:
cmds:
- go run pipeline/cmd/generate/main.go --gen-weap
pipeline-artifacts:
cmds:
- go run pipeline/cmd/generate/main.go --gen-art
pipeline-enemies:
cmds:
- go run pipeline/cmd/generate/main.go --gen-enemies
wasm:
dir: cmd/wasm
cmds:
- go build -o '{{.OUT | default "main.wasm"}}' -ldflags="-X 'main.shareKey=${{if eq OS "windows"}}env:{{end}}GCSIM_SHARE_KEY'"
- echo "compiled wasm successfully!"
env:
GOOS: js
GOARCH: wasm
lint:
cmd: golangci-lint run --fast --fix --print-issued-lines=false --out-format=colored-line-number --issues-exit-code=0
dev-server-mode:
desc: watches for change and launches server mode
watch: true
sources:
- "**/*.go"
vars:
WIN_CMD: Get-CimInstance -ClassName Win32_PRocess -Filter "CommandLine LIKE '%GCSIM_SERVER%'" | ForEach-Object -Process {taskkill /F /PID $_.ProcessId}
cmds:
- cmd: powershell {{shellQuote .WIN_CMD}}
platforms: [windows]
ignore_error: true
- cmd: pkill -f GCSIM_SERVER=1
platforms: [linux, darwin]
ignore_error: true
- go run cmd/server/main.go GCSIM_SERVER=1