diff --git a/Taskfile.yml b/Taskfile.yml index ba0bef3..d6f413e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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}}