limit git tasks to main branch

This commit is contained in:
Sebastian Mark 2024-11-08 16:00:57 +01:00
parent 1ec32bc0d9
commit da4a2ce7b0

View file

@ -5,13 +5,19 @@ vars:
sh: svu next --strip-prefix
VERSIONFILE: version.txt
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
CURRENTBRANCH:
sh: git branch --show-current
tasks:
release:tag:
preconditions:
- test {{.CURRENTBRANCH}} == "main"
cmds:
- git tag v{{.RELEASE}}
release:file:
preconditions:
- test {{.CURRENTBRANCH}} == "main"
cmds:
- echo {{.RELEASE}} >{{.VERSIONFILE}}
- git add {{.VERSIONFILE}}