Skip to content

Commit a8e6f91

Browse files
committed
taskfile
1 parent 9db9ac2 commit a8e6f91

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Taskfile.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: '3'
2+
3+
tasks:
4+
current-version:
5+
cmds:
6+
- 'echo "Version: {{.GIT_TAG_CURRENT}}"'
7+
silent: true
8+
vars:
9+
GIT_TAG_CURRENT:
10+
sh: 'git describe --tags --abbrev=0'
11+
release-version:
12+
cmds:
13+
- 'echo "Version: {{.GIT_TAG_CURRENT}} => {{.VERSION}}"'
14+
- task: release-version-internal
15+
vars:
16+
GIT_TAG_CURRENT:
17+
sh: 'git describe --tags --abbrev=0'
18+
requires:
19+
vars: [VERSION]
20+
preconditions:
21+
- sh: 'test -z "$(git status --porcelain)"'
22+
msg: 'there are uncommited git changes'
23+
silent: true
24+
release-version-internal:
25+
internal: true
26+
prompt: "Creating and pushing tag {{.VERSION}}. Are you sure?"
27+
cmds:
28+
- 'git tag {{.VERSION}}'
29+
- 'git push --tags'
30+
requires:
31+
vars: [VERSION]
32+
silent: true

0 commit comments

Comments
 (0)