From e180fd08505005475feee3369d5eaee6c11ff46f Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:51:28 -0500 Subject: [PATCH] script: add push mode options for no push --- scripts/indexer-sync-v2.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/indexer-sync-v2.sh b/scripts/indexer-sync-v2.sh index c01a9dd67..8e054be25 100644 --- a/scripts/indexer-sync-v2.sh +++ b/scripts/indexer-sync-v2.sh @@ -517,7 +517,7 @@ cleanup_and_commit() { git rm -r -f -q --ignore-unmatch --cached node_modules - log "INFO" "After review; the script will commit the changes." + log "INFO" "After review; the script will commit the changes and push as/if specified." read -r -p "Press any key to continue or [Ctrl-C] to abort. Waiting for human review..." -n1 -s new_commit_msg="$PROWLARR_COMMIT_TEMPLATE $jackett_recent_commit [$(date -u +'%Y-%m-%dT%H:%M:%SZ')]" @@ -546,9 +546,12 @@ push_changes() { git push "$prowlarr_remote_name" "$push_branch" --force-if-includes log "INFO" "Branch Pushed" ;; + skip|none|nopush) + log "INFO" "Skipping Push due to [skip|nopush|none] value" + ;; *) - log "INFO" "Invalid push mode specified. Exiting." - exit 1 + log "INFO" "Invalid push mode specified ($push_mode). Exiting." + exit 2 ;; esac }