瀏覽代碼

update deploy script

dev01
Dom SP 3 年之前
父節點
當前提交
e3bf3edec6
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. +17
    -0
      deploy.sample

+ 17
- 0
deploy.sample 查看文件

@@ -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…
取消
儲存