From 5f2d2d67220e6fa52ad2000c626ebd1873f2ce39 Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 9 Aug 2022 14:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E9=80=81=E8=84=9A=E6=9C=AC=EF=BC=9A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A3=80=E6=9F=A5git=E5=92=8Cenv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pushdocker.sh | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/pushdocker.sh b/pushdocker.sh index 30dda589f..4b1ae5f91 100755 --- a/pushdocker.sh +++ b/pushdocker.sh @@ -43,9 +43,46 @@ else exit 1; fi -node ./config.js ${env} +echo "|*********************|\n" + +if branch=$(git symbolic-ref --short -q HEAD) +then + echo "git on branch $branch \n" +else + echo "git not on any branch \n" +fi +echo "|*********************|\n" + +echo "and config.json is: \n" +node ./config.js ${env} +cat './game-server/config.json' +echo "\n" +echo "|*********************|\n" + +echo "and server_const is \n" +cat './shared/resource/jsons/server_const.json' | grep DEBUG_PAY +cat './shared/resource/jsons/server_const.json' | grep DEBUG_TIME +cat './shared/resource/jsons/server_const.json' | grep CHECK_WORD +cat './shared/resource/jsons/server_const.json' | grep CAN_PAY +cat './shared/resource/jsons/server_const.json' | grep SKIP_ENCODE +echo "\n" +echo "|*********************|" + +read -r -p "Are You Sure? [Y/n]" input + +case $input in + [yY][eE][sS]|[yY]) + echo "Yes" + rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude-from='exclude-file.txt' --progress --inplace --no-owner --no-group --rsh='ssh -p'${port} . ${destUrl} + ;; + [nN][oO]|[nN]) + echo "No" + ;; + *) + echo "Invalid input" + ;; +esac -rsync -av --include '.babelrc' --include '.eslintrc.js' --exclude-from='exclude-file.txt' --progress --inplace --no-owner --no-group --rsh='ssh -p'${port} . ${destUrl} git checkout ./game-server/config.json git checkout ./gm-server/config/env -git checkout ./web-server/config/env +git checkout ./web-server/config/env \ No newline at end of file