Skip to content
Snippets Groups Projects
Commit d855b9ea authored by François Grand's avatar François Grand
Browse files

chore: deploy-version.sh: display remote base href

refs #588
parent 57308da5
No related branches found
No related tags found
No related merge requests found
Pipeline #140163 failed
......@@ -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
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