Skip to content

Commit

Permalink
fix deploy script to allow local updatesite builds
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Apr 9, 2023
1 parent 676ac3e commit d57a660
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your key> as a parameter or GPG_KEY as secret.\e[39m"
exit 1
Expand Down

0 comments on commit d57a660

Please sign in to comment.