forked from create-go-app/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
66 lines (55 loc) · 1.32 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
61
62
63
64
65
66
version: "2"
vars:
APP: cgapp{{exeExt}}
tasks:
default:
cmds:
- task: build
test:
desc: Test project
cmds:
- go test -coverprofile=coverage.out ./...
- go tool cover -func=coverage.out
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
docker-image:
desc: Build Docker image with full features
cmds:
- task: build
- docker build . -t koddr/cgapp
release:
desc: GitHub release for CLI
cmds:
- task: security
- task: test
- git tag -a {{.TAG}} -m "{{.TAG}}"
- git push origin {{.TAG}}
- goreleaser --snapshot --skip-publish --rm-dist
delete-tag:
desc: Delete git tag
cmds:
- git tag --delete {{.TAG}}
update-pkg-cache:
desc: Update pkg.go.dev cache for a new version
cmds:
- curl -i https://proxy.golang.org/github.com/create-go-app/cli/@v/{{.VERSION}}.info