From e332bf0d9685679f4c5415bec7681fd948921fb5 Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Wed, 28 Mar 2018 18:23:48 +0200 Subject: Merge script does not warn when the remote is set to HTTPS. This should solve Emilio's problem. --- dev/tools/merge-pr.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'dev/tools') 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 -- cgit v1.2.3