-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtaskfile.yml
More file actions
156 lines (125 loc) · 4.26 KB
/
taskfile.yml
File metadata and controls
156 lines (125 loc) · 4.26 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# https://taskfile.dev
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
dotenv: ["build/buildvars.env"]
vars:
GREETING: Hello, these are FlexiGPT tasks!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
installtools:
cmds:
- "{{.INSTALL_TOOL_WAILS}}"
- "{{.INSTALL_TOOL_GO_LICENSES}}"
- "{{.INSTALL_TOOL_GOPLS}}"
- "{{.INSTALL_TOOL_GO_MOD_UPGRADE}}"
- "{{.INSTALL_TOOL_REFDIR}}"
- "{{.INSTALL_TOOL_GO_TEST_COVERAGE}}"
- "{{.INSTALL_TOOL_GODEPGRAPH}}"
- "{{.INSTALL_TOOL_GOMAJOR}}"
gomod:
cmds:
- go mod download
- go mod tidy
- go mod verify
# wails doctor ## This can be used to see if system is ready for wails.
licensesgo:
cmds:
- go-licenses report ./... --template "{{.LICENSE_TEMPLATE_PATH}}" --ignore "{{.COMMON_PRODUCT_GITPATH}}" > "{{.LICENSE_GO_FILENAME}}"
cloc:
cmds:
- |
cloc \
--vcs=git --ignored=ignored.txt --exclude_ext=yaml,sum,mod,md5 \
--force-lang=Mustache,tmpl --force-lang=INI,env --force-lang=INI,dev --force-lang=INI,prod \
--not-match-f='LICENSE$|\.npmrc$|\.prettierignore$|\.gitignore$|\.gitattributes$|\.gitmodules$' \
.
cloc-multi:
cmds:
- gh act workflow_dispatch -W "./.github/workflows/cloc-report.yml" --artifact-server-path "{{.ROOT_DIR}}/{{.COMMON_APP_DEV_ARTIFACT_DIR}}"
checkupgrade:
cmds:
- gomajor list
- go-mod-upgrade -l
- pnpm outdated -r
godepgraph:
cmds:
- godepgraph -s -o "{{.COMMON_PRODUCT_GITPATH}}",command-line-arguments "{{.GO_MAIN_ENTRYPOINT}}" | dot -Tpng -o godepgraph.png
tagstats:
cmds:
- ./scripts/git_tag_stats.sh
build-linux:
cmds:
# we dont setup task inside github action, so redirecting these prod builds to pnpm
- "{{.LINUX_BUILD_COMMAND}}"
build-mac:
cmds:
# we dont setup task inside github action, so redirecting these prod builds to pnpm
- "{{.MACOS_BUILD_COMMAND}}"
build-win:
cmds:
# we dont setup task inside github action, so redirecting these prod builds to pnpm
- "{{.WIN_BUILD_COMMAND}}"
build-withbindings:
cmds:
- pnpm run touch:tmp
- cd "{{.GO_BACKEND_DIR}}" && wails build -devtools -m -clean -v 2 -ldflags="-X main.Version={{.COMMON_APP_DEV_VERSION}}" > "{{.ROOT_DIR}}/{{.COMMON_APP_DEV_ARTIFACT_DIR}}/log.txt" 2>&1
pack-flatpak:
cmds:
- gh act workflow_dispatch -W "./.github/workflows/flatpak.yml" --artifact-server-path "{{.ROOT_DIR}}/{{.COMMON_APP_DEV_ARTIFACT_DIR}}" --input tag="{{.COMMON_APP_DEV_VERSION}}"
pack-nsis:
cmds:
- gh act workflow_dispatch -W "./.github/workflows/nsispak.yml" --artifact-server-path "{{.ROOT_DIR}}/{{.COMMON_APP_DEV_ARTIFACT_DIR}}" --input tag="{{.COMMON_APP_DEV_VERSION}}"
pack-macpkg:
cmds:
- gh act workflow_dispatch -W "./.github/workflows/macpkg.yml" --artifact-server-path "{{.ROOT_DIR}}/{{.COMMON_APP_DEV_ARTIFACT_DIR}}" --input tag="{{.COMMON_APP_DEV_VERSION}}"
run-dev:
cmds:
- pnpm run touch:tmp
- cd "{{.GO_BACKEND_DIR}}" && wails dev -s -v 2 -tags webkit2_41 -ldflags="-X main.Version={{.COMMON_APP_DEV_VERSION}}"
run-watch:
cmds:
- pnpm -F frontend run build:wails
- task: run-dev
run-gobackend:
cmds:
- "./scripts/run_backend.sh"
lint-gopls:
cmds:
- ./scripts/lint_gopls_check.sh
lint-godotfix:
cmds:
- golangci-lint run --fix --enable-only=godot
lint-gosort:
cmds:
- pnpm run touch:tmp
- refdir ./...
lint-fix:
cmds:
- golangci-lint run --fix
lint-go:
cmds:
- pnpm run touch:tmp
- golangci-lint run ./... -v
lint:
cmds:
- task: lint-go
- pnpm -F frontend run lint
test-go:
cmds:
- pnpm run touch:tmp
# The count=1 is needed to disable test caching. this is so that coverage doesnt show stale data.
# Issue: https://github.com/golang/go/issues/74873
- go test -count=1 -covermode=atomic -coverpkg=./... -coverprofile=coverage.out ./...
- go tool cover -func=coverage.out
- go-test-coverage --config=./.testcoverage.yml
test:
cmds:
- task: test-go
- pnpm -F frontend run test
lt:
cmds:
- task: lint
- task: test