Skip to content

Commit d57a660

Browse files
committed
fix deploy script to allow local updatesite builds
1 parent 676ac3e commit d57a660

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deploy.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ then
2828
gitCleanup
2929
fi
3030
cd "$SCRIPT_PATH"
31-
else
31+
elif [ "$DEPLOY_UPDATESITE" = "test" ]
3232
echo " ! Not detected cloned gh-pages branch in ../gh-pages folder."
3333
ORIGIN="$(git config --get remote.origin.url)"
34-
SED_OUT=$(echo $ORIGIN | sed -r -E -n 's@^https:\/\/(github.com.*)@\1@p')
34+
SED_OUT=$(echo $ORIGIN | sed -r -E -n 's@^.+(github.com.*)@\1@p')
3535
if [ -n "$SED_OUT" ] && [ -n "$BUILD_USER" ] && [ -n "$BUILD_USER_PASSWD" ]
3636
then
3737
ORIGIN="https://${BUILD_USER}:${BUILD_USER_PASSWD}@$SED_OUT"

functions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fi
150150

151151
## VALIDATE
152152

153-
if [[ "$(basename "$0")" != "build.sh" ]]
153+
if [[ "$(basename $0)" != "build.sh" ]] && [[ -z "$GPG_KEYNAME" ]]
154154
then
155155
echo -e "\e[91m !ERR! Cannot sign artifacts without passing a gpg key for signing. Please pass gpgkey=<your key> as a parameter or GPG_KEY as secret.\e[39m"
156156
exit 1

0 commit comments

Comments
 (0)