Packaging: Ignore the return value of git stash.

Make sure we don't trigger '-e'.

[skip ci]
This commit is contained in:
Gerald Combs 2022-05-11 11:05:40 -07:00
parent 0bde1e795a
commit c5b983c93a
1 changed files with 2 additions and 1 deletions

View File

@ -74,12 +74,13 @@ fi
COMMIT="${CI_COMMIT_SHA:-HEAD}"
STASH_ID=$(git stash create)
STASH_ID=$(git stash create || echo "")
if [[ -n "$STASH_ID" ]] ; then
COMMIT="$STASH_ID"
fi
if [ -f "$TARBALL" ] ; then
printf "Found %s\\n" "$TARBALL"
if TARBALL_ID=$(git get-tar-commit-id < <(xzcat "$TARBALL")) && COMMIT_ID=$(git rev-parse --verify "$COMMIT") ; then
if [[ $TARBALL_ID == "$COMMIT_ID" ]] ; then
echo "$TARBALL commit ID matches $COMMIT."