diff --git a/Taskfile.yaml b/Taskfile.yaml index 387832c1ff..a20afff768 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -306,3 +306,43 @@ tasks: - defer: task: stop-db - go test -count=1 -tags integration $(go list ./... | grep -v "quickstart") -v -failfast + + patch: + desc: Bump patch version (e.g. v0.83.16 → v0.83.17) and push the tag + cmds: + - | + current=$(git describe --tags --abbrev=0) + IFS='.' read -r major minor patch <<< "${current#v}" + patch=$((patch + 1)) + next="v${major}.${minor}.${patch}" + echo "Bumping ${current} → ${next}" + git tag -a "${next}" -m "${next}" + git push origin "${next}" + + minor: + desc: Bump minor version (e.g. v0.83.16 → v0.84.0) and push the tag + cmds: + - | + current=$(git describe --tags --abbrev=0) + IFS='.' read -r major minor patch <<< "${current#v}" + minor=$((minor + 1)) + next="v${major}.${minor}.0" + echo "Bumping ${current} → ${next}" + git tag -a "${next}" -m "${next}" + git push origin "${next}" + + alpha: + desc: Bump to next alpha pre-release (e.g. v0.83.16 → v0.83.16-alpha.0, or v0.83.16-alpha.0 → v0.83.16-alpha.1) + cmds: + - | + current=$(git describe --tags --abbrev=0) + base="${current%%-alpha.*}" + if [[ "${current}" == *-alpha.* ]]; then + alpha_num="${current##*-alpha.}" + next="${base}-alpha.$((alpha_num + 1))" + else + next="${base}-alpha.0" + fi + echo "Bumping ${current} → ${next}" + git tag -a "${next}" -m "${next}" + git push origin "${next}"