Skip to content

Commit

Permalink
script: add push mode options for no push
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerboy448 committed Jun 27, 2024
1 parent bad49b5 commit e180fd0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/indexer-sync-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')]"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e180fd0

Please sign in to comment.