-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
85 lines (75 loc) · 1.93 KB
/
Taskfile.yml
File metadata and controls
85 lines (75 loc) · 1.93 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
# https://taskfile.dev
version: "3"
tasks:
default:
desc: run the loops cli in dev
dotenv:
- .env
- .env.{{.ENV}}
cmds:
- go run ./... {{.CLI_ARGS}}
silent: true
deps:
desc: install/update deps
cmds:
- go mod tidy
build:
desc: build the cli
aliases: [b]
deps:
- deps
cmds:
- go build -o dist/loops ./cmd/loops
test:
desc: run tests
aliases: [t]
cmds:
- go test ./... -cover
vuln:
desc: run govulncheck
aliases: [v]
cmds:
- go tool govulncheck {{.CLI_ARGS}} ./...
release:
desc: release a new cli version
deps:
- release:check
requires:
vars:
- tag
cmds:
- git pull --rebase
- git tag {{.tag}}
- git push origin {{.tag}}
preconditions:
- sh: 'echo "{{.tag}}" | grep -Eq "^v[0-9]+\.[0-9]+\.[0-9]+$"'
msg: "tag {{.tag}} must be a release formatted: v0.0.0 (use release:pre for prereleases)"
- sh: '[ -z "$(git ls-remote --tags origin refs/tags/{{.tag}})" ]'
msg: "tag {{.tag}} already exists on remote"
- sh: '[ "$(git branch --show-current)" = "main" ]'
msg: make sure you're on main
release:pre:
desc: release a new cli prerelease version
aliases: [prerelease]
deps:
- release:check
requires:
vars:
- tag
cmds:
- git pull --rebase
- git tag {{.tag}}
- git push origin {{.tag}}
preconditions:
- sh: 'echo "{{.tag}}" | grep -Eq "^v[0-9]+\.[0-9]+\.[0-9]+-[0-9A-Za-z.-]+$"'
msg: "tag {{.tag}} must be prerelease formatted: v0.0.0-some-tag"
- sh: '[ -z "$(git ls-remote --tags origin refs/tags/{{.tag}})" ]'
msg: "tag {{.tag}} already exists on remote"
release:local:
desc: build with goreleaser
dotenv: [.env.macos-signing]
cmds:
- goreleaser release --snapshot --single-target --clean
release:check:
cmds:
- goreleaser check