From bb01b3b2110c5502bbdcf8f9058622147f7480ac Mon Sep 17 00:00:00 2001 From: P-A Loizeau <p.-a.loizeau@gsi.de> Date: Thu, 3 Dec 2020 16:24:39 +0100 Subject: [PATCH] Unify detection of upstream remote in https and ssh cases --- scripts/check-apply-format-changes.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/check-apply-format-changes.sh b/scripts/check-apply-format-changes.sh index e837f302dd..ebe6fbc1eb 100755 --- a/scripts/check-apply-format-changes.sh +++ b/scripts/check-apply-format-changes.sh @@ -16,14 +16,11 @@ if [[ "$VERSION" != *"11.0.0"* ]]; then fi if [ -z $UPSTREAM ]; then - UPSTREAM=$(git remote -v | grep https://git.cbm.gsi.de/computing/cbmroot | cut -f1 | uniq) + UPSTREAM=$(git remote -v | grep git.cbm.gsi.de[:/]computing/cbmroot | cut -f1 | uniq) if [ -z $UPSTREAM ]; then - UPSTREAM=$(git remote -v | grep git@git.cbm.gsi.de:computing/cbmroot.git | cut -f1 | uniq) - if [ -z $UPSTREAM ]; then - echo "Error: Name of upstream repository not provided and not found by automatic means" - echo 'Please provide if by checking your remotes with "git remote -v" and exporting UPSTREAM' - exit -1 - fi + echo "Error: Name of upstream repository not provided and not found by automatic means" + echo 'Please provide if by checking your remotes with "git remote -v" and exporting UPSTREAM' + exit -1 fi fi echo "Upstream name is :" $UPSTREAM -- GitLab