feat(Taskfile): add check for clean working tree before release

- add a precondition to ensure the working tree is clean before releasing

🤖
This commit is contained in:
Sebastian Mark 2024-11-18 19:36:09 +01:00
parent a121f01371
commit 74ee5f3693

View file

@ -21,6 +21,8 @@ tasks:
preconditions: preconditions:
- sh: test "{{.BRANCH}}" == "main" - sh: test "{{.BRANCH}}" == "main"
msg: "You must be on the main branch to release" msg: "You must be on the main branch to release"
- sh: test -z "$(git status --porcelain)"
msg: "You must have a clean working tree to release"
prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}? prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}?
cmds: cmds:
- git tag {{.RELEASE}} - git tag {{.RELEASE}}