diff --git a/deploy.sh b/deploy.sh index fdb41f11b..de9df7daa 100755 --- a/deploy.sh +++ b/deploy.sh @@ -28,10 +28,10 @@ then gitCleanup fi cd "$SCRIPT_PATH" -else +elif [ "$DEPLOY_UPDATESITE" = "test" ] echo " ! Not detected cloned gh-pages branch in ../gh-pages folder." ORIGIN="$(git config --get remote.origin.url)" - SED_OUT=$(echo $ORIGIN | sed -r -E -n 's@^https:\/\/(github.com.*)@\1@p') + SED_OUT=$(echo $ORIGIN | sed -r -E -n 's@^.+(github.com.*)@\1@p') if [ -n "$SED_OUT" ] && [ -n "$BUILD_USER" ] && [ -n "$BUILD_USER_PASSWD" ] then ORIGIN="https://${BUILD_USER}:${BUILD_USER_PASSWD}@$SED_OUT" diff --git a/functions.sh b/functions.sh index 081730df0..ddca4b898 100755 --- a/functions.sh +++ b/functions.sh @@ -150,7 +150,7 @@ fi ## VALIDATE -if [[ "$(basename "$0")" != "build.sh" ]] +if [[ "$(basename $0)" != "build.sh" ]] && [[ -z "$GPG_KEYNAME" ]] then echo -e "\e[91m !ERR! Cannot sign artifacts without passing a gpg key for signing. Please pass gpgkey= as a parameter or GPG_KEY as secret.\e[39m" exit 1