move varibles to relevant task

This commit is contained in:
Sebastian Mark 2024-11-09 21:53:08 +01:00
parent 053e6e76de
commit ffe33454b4

View file

@ -4,21 +4,21 @@
version: '3'
vars:
RELEASE:
sh: svu next
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
tasks:
release:
desc: Create and publish an new release
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
vars:
RELEASE:
sh: svu next
BRANCH:
sh: git branch --show-current
COMMIT:
sh: git rev-parse --short --verify {{.BRANCH}}
preconditions:
- sh: test "{{.BRANCH}}" == "main"
msg: "You must be on the main branch to release"
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
cmds:
- git tag {{.RELEASE}}
- git push