From ffe33454b4969e19cf1630f6c13d4b48a6ef3ed7 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sat, 9 Nov 2024 21:53:08 +0100 Subject: [PATCH] move varibles to relevant task --- Taskfile.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 01e0a8d..9267111 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,21 +4,21 @@ version: '3' -vars: - RELEASE: - sh: svu next - BRANCH: - sh: git branch --show-current - COMMIT: - sh: git rev-parse --short --verify {{.BRANCH}} - tasks: release: desc: Create and publish an new release - prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}? + vars: + RELEASE: + sh: svu next + BRANCH: + sh: git branch --show-current + COMMIT: + sh: git rev-parse --short --verify {{.BRANCH}} preconditions: - sh: test "{{.BRANCH}}" == "main" + msg: "You must be on the main branch to release" + prompt: Create new release {{.RELEASE}} from {{.COMMIT}}@{{.BRANCH}}? cmds: - git tag {{.RELEASE}} - git push