修改环境变量使用

This commit is contained in:
luying
2020-12-28 20:31:04 +08:00
parent d507c7bf7f
commit afd850e69e
19 changed files with 599 additions and 240 deletions

View File

@@ -1,2 +1,24 @@
#!/bin/sh
rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude '.*' --exclude 'node_modules' --exclude 'bower_components' --exclude 'dist' --progress --inplace --no-owner --no-group --rsh='ssh -p22' . root@ltctest:/root/zyz/game-server/
if [ $# != 1 ] ; then
echo "需要1个参数"
echo "stable: 同步代码到 stable 服务器上,作为正式服使用"
echo "alpha: 同步代码到 alpha 服务器上,作为测试服供服务开发使用"
echo "dev: 同步代码到 dev 服务器上,作为测试服供服务开发使用"
exit 1;
fi
if [ ${1} == 'stable' ] ; then
destUrl="root@zyz:/root/zyz/game-server"
elif [ ${1} == 'alpha' ] ; then
destUrl="root@zyzalpha:/root/zyz/game-server"
elif [ ${1} == 'dev' ] ; then
destUrl="root@zyzdev:/root/zyz/game-server"
else
echo "需要一个参数指明服务器"
exit 1;
fi
node ./config.js ${1}
rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude '.*' --exclude './game-server/node_modules' --exclude './game-server/node_modules' --exclude './game-server/dist' --exclude 'node_modules' --exclude 'bower_components' --exclude 'dist' --progress --inplace --no-owner --no-group --rsh='ssh -p22' . ${destUrl}
git checkout ./config.json