This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_0 by this push:
new 0426f89 Attempt to detect cherrypick remote if not specified (#569)
0426f89 is described below
commit 0426f89e5cb10f10b157c717c16ca4140d3a008f
Author: Mike Drob <[email protected]>
AuthorDate: Thu Jan 27 12:27:27 2022 -0600
Attempt to detect cherrypick remote if not specified (#569)
---
dev-tools/scripts/cherrypick.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dev-tools/scripts/cherrypick.sh b/dev-tools/scripts/cherrypick.sh
index e71ff45..b3902cc 100755
--- a/dev-tools/scripts/cherrypick.sh
+++ b/dev-tools/scripts/cherrypick.sh
@@ -196,15 +196,19 @@ for BRANCH in "${BRANCHES[@]}"; do
LOG "WARN" "Cannot auto push if tests are disabled"
exit 1
fi
+ if [[ -z "$REMOTE" ]]; then
+ LOG "WARN" "Remote not specified, attempting to auto detect"
+ REMOTE=$(git config --get "branch.$BRANCH.remote")
+ fi
LOG "INFO" "Pushing changes to $REMOTE/$BRANCH"
# shellcheck disable=SC2086
$GIT_COMMAND push $REMOTE $BRANCH
if [ $? -gt 0 ]; then
- LOG "WARN" "PUSH to $REMOTE/$BRANCH failed, please clean up an proceed
manually"
+ LOG "WARN" "PUSH to $REMOTE/$BRANCH failed, please clean up and proceed
manually"
exit 2
fi
LOG "INFO" "Pushed $BRANCH to remote. Cherry-pick complete."
fi
done
-LOG "INFO" "SUCCESS on branches ${BRANCHES[*]} for commits ${COMMITS[*]}"
\ No newline at end of file
+LOG "INFO" "SUCCESS on branches ${BRANCHES[*]} for commits ${COMMITS[*]}"