Skip to content

Commit

Permalink
Exit on failure to save COMMIT file
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Aug 4, 2023
1 parent cc49950 commit d048151
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ build_php() {
save_commit() {
# Only store commit for unstable versions
if [ "${stable:?}" = "false" ]; then
basename "$(curl -sL https://api.github.com/repos/php/php-src/commits/"${branch:?}" | jq -r .commit.url)" | tee "$INSTALL_ROOT/etc/php/$PHP_VERSION/COMMIT" >/dev/null 2>&1
commit="$(basename "$(curl -sL https://api.github.com/repos/php/php-src/commits/"${branch:?}" | jq -r .commit.url)")"
[ "$commit" = 'null' ] && exit 1;
echo "$commit" | tee "$INSTALL_ROOT/etc/php/$PHP_VERSION/COMMIT" >/dev/null 2>&1
fi
}

Expand Down

0 comments on commit d048151

Please sign in to comment.