Skip to content

Commit db3a193

Browse files
committed
fix: add error handling to tag.sh
1 parent 2f42651 commit db3a193

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.buildkite/tag.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,19 @@ fi
3232

3333
git remote set-url origin "https://alexhraber:${GITHUB_TOKEN}@github.com/alexhraber/builddeck.git"
3434

35+
# Create tag
3536
git tag -a "${VERSION}" -m "Release ${VERSION}"
36-
git push origin "${VERSION}"
37-
echo "Tagged ${VERSION}"
37+
echo "Tag created locally: ${VERSION}"
38+
39+
# Push tag with explicit error handling
40+
if git push origin "${VERSION}"; then
41+
echo "Tagged ${VERSION}"
42+
else
43+
echo "ERROR: Failed to push tag ${VERSION}"
44+
exit 1
45+
fi
3846

3947
# Output version to artifact for TUI consumption
4048
echo "${VERSION}" > tag.txt
41-
buildkite-agent artifact upload tag.txt
49+
buildkite-agent artifact upload tag.txt
50+
echo "Uploaded tag.txt artifact"

0 commit comments

Comments
 (0)