From 74ee5f3693865dd4985ea1796fa65fda1062002d Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 18 Nov 2024 19:36:09 +0100 Subject: [PATCH] feat(Taskfile): add check for clean working tree before release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add a precondition to ensure the working tree is clean before releasing 🤖 --- Taskfile.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 8efbf3a..a6a99d9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,6 +21,8 @@ tasks: preconditions: - sh: test "{{.BRANCH}}" == "main" 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}}? cmds: - git tag {{.RELEASE}}