-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
41 lines (35 loc) · 1.13 KB
/
Copy pathTaskfile.yml
File metadata and controls
41 lines (35 loc) · 1.13 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
version: "3"
vars:
HASH: { sh: git rev-parse --short HEAD }
BRANCH: { sh: git rev-parse --abbrev-ref HEAD }
BINARY_PATH: ./bin/main
tasks:
tools:
env:
FILE: ".git/hooks/pre-commit"
cmds:
- go install -v github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- go install -v github.com/air-verse/air@latest
- go install -v github.com/golang/mock/mockgen@latest
- go install -v github.com/fatih/gomodifytags@latest
- go install -v github.com/golang-migrate/migrate/v4/cmd/migrate@latest
- go install -v gotest.tools/gotestsum@latest
- go install -v github.com/segmentio/golines@latest
- cp .github/pre-commit.sh $FILE
- chmod +x $FILE
- test -f $FILE && echo "$FILE exists."
generate:
cmds:
- go generate ./...
analysis:
deps: [generate]
cmds:
- golangci-lint run --new-from-rev HEAD~ ./...
unit_tests:
deps: [generate]
cmds:
- gotestsum --format=testname --hide-summary=skipped -- -failfast -count=1 -v -race ./...
build:
deps: [generate]
cmds:
- go build -o bin/go_build_gdk && rm bin/go_build_gdk