diff --git a/scripts/deploy-version.sh b/scripts/deploy-version.sh index 4f05359f918d7669d96fdac20650d999cb946951..fe9182c929a4d317309e82aa3c143ce0b618e469 100755 --- a/scripts/deploy-version.sh +++ b/scripts/deploy-version.sh @@ -15,11 +15,20 @@ LOGIN="$2" HOST="$3" DIR="$4" +function display_remote_href() +{ + echo "base href in deployed index.html (host=$HOST) :" + ssh $LOGIN@$HOST "grep \<base $DIR/index.html" +} + echo "$(basename $0): deploying version $VERSION in $LOGIN@$HOST:$DIR" if [[ $VERSION == "prod" || $VERSION == "prod-devel" ]]; then # Copie de la branche production rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" dist/ ${LOGIN}@${HOST}:${DIR}/ + + display_remote_href + # Modification du dossier base href echo "updating index.html" if [[ $VERSION == "prod" ]]; then @@ -27,7 +36,12 @@ if [[ $VERSION == "prod" || $VERSION == "prod-devel" ]]; then else ssh $LOGIN@$HOST "sed -i 's:/cassiopee/devel/:/:g' $DIR/index.html" fi + + display_remote_href else # Copie de la branche / du tag rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" "dist/" "$LOGIN@$HOST:$DIR/$VERSION" + + echo "NOT updating index.html" + display_remote_href fi