From 3194d2dbb35dca4d3c71fdde56f63df208357603 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Fri, 22 Jul 2022 13:39:28 -0400 Subject: [PATCH] actually use error return values instead of completely exiting --- ci-tools/update-production | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci-tools/update-production b/ci-tools/update-production index 695a7c08..0fc76c17 100755 --- a/ci-tools/update-production +++ b/ci-tools/update-production @@ -16,7 +16,10 @@ main() { shift # If there have been no changes we'll just abandon this update. - ensure_changes "$SOURCE_BRANCH" "$TARGET_BRANCH" + if ! ensure_changes "$SOURCE_BRANCH" "$TARGET_BRANCH"; then + echo "No changes." + exit 0 + fi local NOTES=$(describe_update "$SOURCE_BRANCH" "$TARGET_BRANCH") @@ -30,8 +33,7 @@ ensure_changes() { shift if [ $(git rev-parse "$SOURCE_BRANCH") -eq $(git rev-parse "$TARGET_BRANCH") ]; then - echo "No changes." - exit 0 + return 1 fi } -- GitLab