Browse Source

update deploy script

dev01
Dom SP 3 years ago
parent
commit
e3bf3edec6
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      deploy.sample

+ 17
- 0
deploy.sample View File

@@ -29,6 +29,10 @@ if [[ -z $2 ]]
then
echo "Running App Sync (dry-run)"
rsync --dry-run -az --force --delete --progress --exclude-from=.rsyncignore ./ $USER@$SERVER:$DIR;
elif [[ $2 == "ssh" ]]
then
echo "entering server"
ssh -t $USER@$SERVER "cd $LIVE_DIR; bash --login";
elif [[ $2 == "go" ]]
then
echo "Running App Sync"
@@ -57,6 +61,19 @@ then
echo "Uploading Content"
rsync -azv --progress --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT;
echo "done"
elif [[ $4 == "del" ]]
then
if [[ -z $5 ]]
then
echo "Uploading Content, deleting remotes that don't occur locally (dry-run)"
rsync --dry-run -azv --progress --delete --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT;
echo "done"
elif [[ $5 == "go" ]]
then
echo "Uploading Content, deleting remotes that don't occur locally"
rsync -azv --progress --delete --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT;
echo "done"
fi
fi
fi
fi

Loading…
Cancel
Save