forked from doublechaintech/scm-biz-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
huawei-sync.sh
13 lines (11 loc) · 1.07 KB
/
huawei-sync.sh
1
2
3
4
5
6
7
8
9
10
11
12
MODELNAME=retailscm
cd ~/githome/${MODELNAME}-biz-suite/ && rm -rf bizcore/WEB-INF/${MODELNAME}_core_src
java -jar ~/githome/splitter.jar ${MODELNAME}
# cd ~/githome/${MODELNAME}-biz-suite/&& git pull --allow-unrelated-histories && cd ../
cd ~/githome/${MODELNAME}-biz-suite/bizcore&& ~/.sdkman/candidates/gradle/5.2.1/bin/gradle classes && cd ../../
cd ~/githome/${MODELNAME}-biz-suite/ && rsync -avz bizcore/* ${DEST_HOST}:~/resin-3.1.12/webapps/${MODELNAME}/
ssh ${DEST_HOST} "mysqldump -h127.0.0.1 -u root --password=0254891276 --skip-quick --skip-tz-utc --skip-dump-date --skip-set-charset --skip-quote-names --skip-comments ${MODELNAME} > backup/${MODELNAME}.$(date +%Y%m%dT%H%M%S).sql"
ssh ${DEST_HOST} "mysql -uroot -p0254891276 -h 127.0.0.1 < resin-3.1.12/webapps/${MODELNAME}/WEB-INF/${MODELNAME}_core_src/META-INF/${MODELNAME}_mysql.sql"
cd ~/githome/${MODELNAME}-biz-suite/bizui&& yarn install && yarn build && cd ../../
cd ~/githome/${MODELNAME}-biz-suite/bizui && rsync -avz dist/* ${DEST_HOST}:~/resin-3.1.12/webapps/ROOT/admin/${MODELNAME}/