BlueGit

timfa copper-key

Allow release bump push to fail without failing the pipeline.

Bumped files still pass to later jobs via artifacts when branch push is denied.

Co-authored-by: Cursor <cursoragent@cursor.com>

timfa Tim Falken · pushed by timfa

Authored 2026-08-21 · 2 months ago

Hash
8e4bb9d75abb94cd0a8486b00eec54581ebade27
Parent
31722482
1 file changed +7 −3
scripts/release.sh +7 −3
@@ -128,9 +128,13 @@ bump_and_push() {
128 128 git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
129 129
130 130 # Push version bump only. Protected tags cannot be moved/updated.
131 git push origin "HEAD:refs/heads/${branch}" -o ci.skip
132
133 echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
131 # Push may fail (token/branch ACL); the bumped files still flow to later jobs via artifacts.
132 if git push origin "HEAD:refs/heads/${branch}" -o ci.skip; then
133 echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
134 else
135 echo "WARNING: Could not push version bump to ${branch}; continuing with local bump for this pipeline."
136 echo "WARNING: Master will catch up on a later successful bump push."
137 fi
134 138 }
135 139
136 140 upload_file() {
@@ -128,9 +128,13 @@ bump_and_push() {
128 git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
128 git remote set-url origin "https://oauth2:${token}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
129
129
130 # Push version bump only. Protected tags cannot be moved/updated.
130 # Push version bump only. Protected tags cannot be moved/updated.
131 git push origin "HEAD:refs/heads/${branch}" -o ci.skip
131 # Push may fail (token/branch ACL); the bumped files still flow to later jobs via artifacts.
132
132 if git push origin "HEAD:refs/heads/${branch}" -o ci.skip; then
133 echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
133 echo "Pushed version bump for ${tag} to ${branch} (ci.skip). Tag left unchanged."
134 else
135 echo "WARNING: Could not push version bump to ${branch}; continuing with local bump for this pipeline."
136 echo "WARNING: Master will catch up on a later successful bump push."
137 fi
134}
138}
135
139
136upload_file() {
140upload_file() {