-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathTaskfile.yml
More file actions
80 lines (74 loc) · 2.45 KB
/
Copy pathTaskfile.yml
File metadata and controls
80 lines (74 loc) · 2.45 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
76
77
78
79
80
version: '3'
tasks:
build:
cmds:
- task: protos
- task: embed
- task: pipeline
protos:
cmds:
- cd ui && yarn install
- |
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
msgp:
cmd: go generate ./pkg/stats
embed:
cmd: ./scripts/build_preview.sh
pipeline:
desc: Run pipeline
vars:
CLI_ARGS: '{{.CLI_ARGS | default "run"}}'
cmds:
- go generate ./pipeline
- go run ./pipeline {{.CLI_ARGS}}
pipeline-add:
cmds:
- git add -v 'ui/packages/docs/docs/reference/*/*.md' > /dev/null
- git add -v '*.dm.*'
pipeline-clean:
cmds:
- git rm -f --ignore-unmatch 'ui/packages/docs/docs/reference/*/*.md' > /dev/null
- git rm -f --ignore-unmatch '*.dm.*'
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:
desc: Run golangci-lint
cmd: golangci-lint run
lint-fix:
desc: Run golangci-lint and fix issues
cmd: golangci-lint run --fix
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