-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
121 lines (102 loc) · 2.62 KB
/
Taskfile.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# https://taskfile.dev
version: '3'
vars:
REPO_NAME: go-printers
REPO_OWNER: davidalpert
CURRENT_VERSION:
sh: sbot get version
VERSION: '{{ .NEXT_VERSION | default .CURRENT_VERSION }}'
tasks:
default:
deps:
- help
silent: true
cit:
desc: CI task; cleans, run tests, and builds
deps:
- clean
- vale
- test
clean:
desc: clean build output
cmds:
- rm -rf ./bin
vale:
desc: run linting rules against markdown files
run: once
cmds:
- vale README.md CONTRIBUTING.md # we don't valedate CHANGELOG.md as that reflects historical commit summaries
status:
- '[[ -n "$GITHUB_ACTIONS" ]]'
doctor:
desc: run doctor.sh to sort out development dependencies
cmds:
- ./.tools/doctor.sh
guard:
desc: run guard to vale in real-time
cmds:
- bundle exec guard
bundle:
desc: install ruby gems
run: once
cmds:
- bundle --quiet
test:
desc: run tests
run: once
cmds:
- go test -v ./...
silent: true
autotest:
desc: run tests continuously using goconvey's test UI
cmds:
- goconvey
silent: true
changelog:
desc: generate/update CHANGELOG.md
cmds:
- git-chglog --output CHANGELOG.md
preview-release-notes:
desc: preview release notes (generates RELEASE_NOTES.md)
cmds:
- git-chglog --output RELEASE_NOTES.md --template .chglog/RELEASE_NOTES.tpl.md "v{{ .VERSION }}"
release:
cmds:
- git-chglog --next-tag v{{ .NEXT_VERSION }} --output CHANGELOG.md
- git add -f CHANGELOG.md
- git commit --message "release notes for v{{ .NEXT_VERSION }}"
- sbot release version --mode {{ .BUMP_TYPE }}
- git show --no-patch --format=short v{{ .NEXT_VERSION }}
preconditions:
- sh: git diff-files --quiet
msg: There are unstaged changes; clean your working directory before releasing.
- sh: git diff-index --quiet --cached HEAD --
msg: There are uncomitted changes; clean your working directory before releasing.
vars:
NEXT_VERSION:
sh: sbot predict version --mode {{ .BUMP_TYPE }}
release-patch:
desc: release a patch update
cmds:
- task: release
vars:
BUMP_TYPE: patch
release-minor:
desc: release a minor update
cmds:
- task: release
vars:
BUMP_TYPE: minor
release-major:
desc: release a major update
cmds:
- task: release
vars:
BUMP_TYPE: major
help:
desc: list targets
cmds:
- echo "{{ .CMD_NAME}} v{{ .VERSION }}"
- echo ""
- task --list
silent: true