Change summary
Taskfile.yaml | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Detailed changes
@@ -115,3 +115,32 @@ tasks:
cmds:
- git tag -d nightly || true
- git fetch --tags
+
+ release:fork:
+ desc: Create and push a fork release tag
+ vars:
+ UPSTREAM_VERSION:
+ sh: git describe --tags --abbrev=0 upstream/main 2>/dev/null || echo "v0.0.0"
+ FORK_VERSION:
+ sh: |
+ UP=$(git describe --tags --abbrev=0 upstream/main 2>/dev/null | sed 's/^v//' || echo "0.0.0")
+ MAJOR=$(echo $UP | cut -d. -f1)
+ MINOR=$(echo $UP | cut -d. -f2)
+ PATCH=$(echo $UP | cut -d. -f3)
+ NEXT_PATCH=$((PATCH + 1))
+ # Count existing fork tags for this base version
+ EXISTING=$(git tag -l "v$MAJOR.$MINOR.$NEXT_PATCH" "v$MAJOR.$MINOR.$((NEXT_PATCH+1))" "v$MAJOR.$MINOR.$((NEXT_PATCH+2))" | wc -l)
+ echo "v$MAJOR.$MINOR.$((NEXT_PATCH + EXISTING))"
+ TAG: "{{.FORK_VERSION}}"
+ prompt: "Create fork release {{.TAG}}?"
+ preconditions:
+ - sh: '[ $(git symbolic-ref --short HEAD) = "dev" ]'
+ msg: Not on dev branch
+ - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
+ msg: "Git is dirty"
+ cmds:
+ - git tag -d nightly || true
+ - git fetch upstream --tags
+ - git tag -a {{.TAG}}
+ - git push soft {{.TAG}}
+ - echo "Released {{.TAG}}"