-
Notifications
You must be signed in to change notification settings - Fork 244
/
Taskfile.yml
60 lines (50 loc) · 1.06 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
version: "2"
vars:
APP: cgapp{{exeExt}}
tasks:
default:
cmds:
- task: build
test:
desc: Test project
cmds:
- go test -timeout 60s -cover ./...
security:
desc: Run gosec for project
cmds:
- gosec -quiet ./...
generate:
desc: Generate blob.go with embed files
cmds:
- go generate ./...
build:
desc: Test release CLI
cmds:
- task: generate
- task: security
- task: test
- goreleaser --snapshot --skip-publish --rm-dist
install:
desc: Install CLI to $GOPATH/bin
cmds:
- task: security
- task: test
- task: generate
- go build -i -o $GOPATH/bin/cgapp ./*.go
linters:
desc: Linters
cmds:
- ansible-lint ./configs/deploy-playbook.yml
release:
desc: GitHub release for CLI
cmds:
- task: linters
- task: security
- task: test
- git tag -a {{.TAG}} -m "{{.TAG}}"
- git push origin {{.TAG}}
- goreleaser --rm-dist
delete-tag:
desc: Delete git tag
cmds:
- git tag --delete {{.TAG}}