Commit 808691c2 authored by mh's avatar mh
Browse files

fix bash cmd in gitlab ci

parent 2731fc63
Pipeline #3696 failed with stages
in 4 minutes and 45 seconds
......@@ -60,16 +60,16 @@ deploy:
# We need to catch possible errors, as lftp seems buggy: It fails if the dir already exists,
# even if called with the -f option, which should ignore errors (like this one).
# lftp needs a "dummy" password, even if key-based authentication is used.
- if ! [ "$CI_COMMIT_REF_SLUG" == "master" ];
then DEPLOY_SLUG="www/$DEPLOY_SLUG";
- if ! [ "$CI_COMMIT_REF_SLUG" == "master" ]; then
DEPLOY_SLUG="www/$DEPLOY_SLUG";
export DEPLOY_SLUG;
lftp -e "mkdir -fp $DEPLOY_SLUG; quit" -u $DEPLOY_USER,dummy sftp://$DEPLOY_HOST || /bin/true;
else
DEPLOY_SLUG="www";
export DEPLOY_SLUG;
fi
fi;
echo "${DEPLOY_HOST_FPS}" | awk '{ print $1 }' | while read -r host; do
lftp -e "mirror -eRv -x ^dev/ public $DEPLOY_SLUG; quit;" -u $DEPLOY_USER,dummy sftp://$host
lftp -e "mirror -eRv -x ^dev/ public $DEPLOY_SLUG; quit;" -u $DEPLOY_USER,dummy sftp://$host;
done
# TODO: Implement clean up: Remove the review dir once the merge to master happened.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment