Skip to content
Snippets Groups Projects
Commit 0aa0d2c3 authored by David Dorchies's avatar David Dorchies
Browse files

fix: correct definition of the base folder for prod and dev versions

Refs #540
parent 2be24483
No related branches found
No related tags found
No related merge requests found
Pipeline #139658 failed
......@@ -118,8 +118,7 @@ deploy-dev:
- build
script:
# Copie de la branche / du tag
- if [[ $CI_COMMIT_REF_NAME != "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH; fi
- if [[ $CI_COMMIT_REF_NAME == "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH/stable 0; fi
- ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH
deploy-prod:
stage: deploy-prod
......@@ -129,7 +128,7 @@ deploy-prod:
dependencies:
- build
script:
- ./scripts/deploy-version.sh stable $PROD_LOGIN $PROD_HOST $PROD_PATH 1 $PROD_PASS
- ./scripts/deploy-version.sh prod $PROD_LOGIN $PROD_HOST $PROD_PATH $PROD_PASS
releases-nightly:
stage: releases-nightly
......
......@@ -14,20 +14,16 @@ VERSION="$1"
LOGIN="$2"
HOST="$3"
DIR="$4"
UPDATE_INDEX=$5
PASS="$6"
PASS="$5"
echo "$(basename $0): deploying version $VERSION in $LOGIN@$HOST:$DIR"
if [[ $VERSION == "stable" ]]; then
if [[ $VERSION == "prod" ]]; then
# Copie de la branche production
rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" dist/ ${LOGIN}@${HOST}:${DIR}/
if (( $UPDATE_INDEX == 1 )); then
# Modification du dossier base href
echo "updating index.html"
ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html"
fi
# Modification du dossier base href
echo "updating index.html"
ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html"
else
# Copie de la branche / du tag
rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" "dist/" "$LOGIN@$HOST:$DIR/$VERSION"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment