limit git tasks to main branch
This commit is contained in:
parent
1ec32bc0d9
commit
da4a2ce7b0
1 changed files with 6 additions and 0 deletions
|
@ -5,13 +5,19 @@ vars:
|
||||||
sh: svu next --strip-prefix
|
sh: svu next --strip-prefix
|
||||||
VERSIONFILE: version.txt
|
VERSIONFILE: version.txt
|
||||||
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
|
COMMITMSG: "chore: bump version to v{{.RELEASE}}"
|
||||||
|
CURRENTBRANCH:
|
||||||
|
sh: git branch --show-current
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
release:tag:
|
release:tag:
|
||||||
|
preconditions:
|
||||||
|
- test {{.CURRENTBRANCH}} == "main"
|
||||||
cmds:
|
cmds:
|
||||||
- git tag v{{.RELEASE}}
|
- git tag v{{.RELEASE}}
|
||||||
|
|
||||||
release:file:
|
release:file:
|
||||||
|
preconditions:
|
||||||
|
- test {{.CURRENTBRANCH}} == "main"
|
||||||
cmds:
|
cmds:
|
||||||
- echo {{.RELEASE}} >{{.VERSIONFILE}}
|
- echo {{.RELEASE}} >{{.VERSIONFILE}}
|
||||||
- git add {{.VERSIONFILE}}
|
- git add {{.VERSIONFILE}}
|
||||||
|
|
Loading…
Reference in a new issue