Skip to content

Commit fcdd2bf

Browse files
committed
add taskfile descriptions
1 parent 752a846 commit fcdd2bf

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Taskfile.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@ vars:
99

1010
tasks:
1111
install:
12+
desc: Install development dependencies (swagger, mockery, gofumpt, golangci-lint)
1213
cmds:
1314
- cmd: go install github.com/go-swagger/go-swagger/cmd/swagger@latest
1415
- cmd: go install github.com/vektra/mockery/[email protected]
1516
- cmd: go install mvdan.cc/[email protected]
1617
- cmd: go install github.com/daixiang0/[email protected]
1718
- cmd: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.3.0
18-
- cmd: echo "PATH=$PATH"
19-
- cmd: echo "GOPATH=$GOPATH"
2019

2120
generate:
21+
desc: Generate code and mocks
2222
cmds:
2323
- cmd: go generate -x -v ./...
24-
- cmd: echo "PATH=$PATH"
25-
- cmd: echo "GOPATH=$GOPATH"
2624
- task: generate-mocks
25+
- task: setup-node-folder
2726

2827
generate-mocks:
28+
desc: Generate mock files using mockery
2929
cmds:
3030
- cmd: mockery
3131

3232
generate-test-data:
33+
desc: Generate test data for database tests
3334
cmds:
3435
- cmd: go run int/db/test_data/generate_test_data.go
3536

3637
setup-node-folder:
38+
desc: Setup node binaries for different platforms (mainnet and buildnet)
3739
cmds:
3840
- cmd: scripts/setup-node-unix.sh {{.MAINNET_VERSION}} {{.BUILDNET_VERSION}} {{.MAINNET_NODEBIN}} {{.BUILDNET_NODEBIN}} {{.NODE_MASSA_DIR}}
3941
platforms: [linux, darwin]
@@ -78,6 +80,7 @@ tasks:
7880
# This task is used to setup windows node binaries in linux environment.
7981
# It is used in github action workflow ci
8082
ci-setup-windows-node-with-unix:
83+
desc: Setup Windows node binaries in Linux CI environment
8184
platforms: [linux]
8285
cmds:
8386
- cmd: scripts/ci-setup-node-from-linux.sh {{.MAINNET_VERSION}} {{.BUILDNET_VERSION}} {{.NODE_MASSA_DIR}}
@@ -86,14 +89,14 @@ tasks:
8689
BUILDNET_NODEBIN: "massa_{{.BUILDNET_VERSION}}_release_windows.zip"
8790

8891
run:
92+
desc: Run the built application in standalone mode
8993
cmds:
9094
- cmd: ./build/node-manager-plugin
9195
env:
9296
STANDALONE: 1
9397
LOG_LEVEL: DEBUG
9498

9599
build-backend:
96-
build:
97100
desc: Internal build task
98101
cmds:
99102
- cmd: 'echo Building node-manager {{.APP_NAME}} for $GOOS/$GOARCH'
@@ -114,19 +117,22 @@ tasks:
114117
VERSION: "{{.VERSION | default nil}}"
115118

116119
build-frontend:
120+
desc: Build the web frontend
117121
dir: web
118122
cmds:
119123
- cmd: npm run build{{.BUILD_MODE}}
120124
vars:
121125
BUILD_MODE: '{{if eq .STANDALONE 1}}:standalone{{end}}'
122126

123127
build:
128+
desc: Build both frontend and backend
124129
cmds:
125130
- task: build-frontend
126131
- task: build-backend
127132

128133

129134
build-standalone:
135+
desc: Build in standalone mode (frontend and backend)
130136
cmds:
131137
- task: build-frontend
132138
vars:
@@ -135,10 +141,12 @@ tasks:
135141

136142

137143
clean:
144+
desc: Clean build artifacts, node_modules and generated files
138145
cmds:
139146
- cmd: rm -rf build && rm -rf web/node_modules && rm -rf int/api/html/dist
140147

141148
install-plugin:
149+
desc: Install the plugin to MassaStation (platform-specific paths)
142150
cmds:
143151
- cmd: mkdir -p /usr/local/share/massastation/plugins/node-manager-plugin
144152
platforms: [linux, darwin]
@@ -163,14 +171,17 @@ tasks:
163171
platforms: [windows]
164172

165173
test:
174+
desc: Run Go tests for all packages
166175
cmds:
167176
- cmd: go test ./...
168177

169178
lint:
179+
desc: Run golangci-lint for code quality checks
170180
cmds:
171181
- cmd: golangci-lint run
172182

173183
fmt:
184+
desc: Format code (go mod tidy, gofumpt, gci, lint --fix, npm fmt)
174185
cmds:
175186
- cmd: go mod tidy
176187
- cmd: gofumpt -l -w .

0 commit comments

Comments
 (0)