3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-14 19:15:41 +00:00

Make Nightly tag SHA check robust

This commit is contained in:
copilot-swe-agent[bot] 2026-07-12 23:47:13 +00:00 committed by GitHub
parent 2f11f6121a
commit 1de3515ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -851,12 +851,16 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
git tag -f Nightly "${{ github.sha }}"
if ! git push --force-with-lease origin refs/tags/Nightly; then
if ! git push --force origin refs/tags/Nightly; then
echo "Failed to push Nightly tag to origin"
exit 1
fi
TAG_SHA="$(git ls-remote --tags origin refs/tags/Nightly | awk '$2 == "refs/tags/Nightly" { print $1 }')"
TAG_SHA="$(git ls-remote --tags origin refs/tags/Nightly refs/tags/Nightly^{} | awk '
$2 == "refs/tags/Nightly^{}" { sha = $1 }
$2 == "refs/tags/Nightly" && sha == "" { sha = $1 }
END { print sha }
')"
if [ "$TAG_SHA" != "${{ github.sha }}" ]; then
echo "Nightly tag points to $TAG_SHA, expected ${{ github.sha }}"
exit 1