aboutsummaryrefslogtreecommitdiffhomepage
path: root/dev/tools
diff options
context:
space:
mode:
authorGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-03-28 18:23:48 +0200
committerGravatar Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-04-08 20:46:10 +0200
commite332bf0d9685679f4c5415bec7681fd948921fb5 (patch)
tree4e07e6ead8d8a5643d727adee25b2ee22fc29e00 /dev/tools
parent7d3e3f0aa5aea66a5e3c884eb0642a317d762051 (diff)
Merge script does not warn when the remote is set to HTTPS.
This should solve Emilio's problem.
Diffstat (limited to 'dev/tools')
-rwxr-xr-xdev/tools/merge-pr.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/dev/tools/merge-pr.sh b/dev/tools/merge-pr.sh
index aa83c626e..337fa43a3 100755
--- a/dev/tools/merge-pr.sh
+++ b/dev/tools/merge-pr.sh
@@ -4,7 +4,8 @@ set -e
set -o pipefail
API=https://api.github.com/repos/coq/coq
-OFFICIAL_REMOTE_URL="git@github.com:coq/coq"
+OFFICIAL_REMOTE_GIT_URL="git@github.com:coq/coq"
+OFFICIAL_REMOTE_HTTPS_URL="https://github.com/coq/coq"
# This script depends (at least) on git and jq.
# It should be used like this: dev/tools/merge-pr.sh /PR number/
@@ -80,10 +81,12 @@ if [ -z "$REMOTE" ]; then
exit 1
fi
REMOTE_URL=$(git remote get-url "$REMOTE" --all)
-if [ "$REMOTE_URL" != "$OFFICIAL_REMOTE_URL" ] && \
- [ "$REMOTE_URL" != "$OFFICIAL_REMOTE_URL.git" ]; then
+if [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_GIT_URL}" ] && \
+ [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_GIT_URL}.git" ] && \
+ [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_HTTPS_URL}" ] && \
+ [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_HTTPS_URL}.git" ]; then
error "remote ${BLUE}$REMOTE${RESET} does not point to the official Coq repo"
- error "that is ${BLUE}$OFFICIAL_REMOTE_URL"
+ error "that is ${BLUE}$OFFICIAL_REMOTE_GIT_URL"
error "it points to ${BLUE}$REMOTE_URL${RESET} instead"
ask_confirmation
fi