40 lines
1.0 KiB
Bash
40 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
#########################################################################
|
|
# File Name: update-delivery.sh
|
|
# Created on: 2019-09-11 16:21:57
|
|
# Author: Wu Kang
|
|
# Last Modified: 2022-03-02 18:23:36
|
|
# Description:
|
|
#########################################################################
|
|
|
|
#/bin/bash
|
|
#by wk
|
|
. /etc/profile
|
|
ip=$1
|
|
BASE_DIR="/data/update/project/miduo_pay"
|
|
|
|
if [ ! -d ${BASE_DIR} ]; then
|
|
echo "your input ${BASE_DIR} Branch does not exist!"
|
|
exit 7
|
|
fi
|
|
|
|
cd ${BASE_DIR}/ || exit
|
|
git pull
|
|
|
|
|
|
#rm -rf ./thrift_temp
|
|
#mkdir ./thrift_temp
|
|
#find ./src/main/thrift/idl -name "*.thrift" -type f|xargs -i thrift -r -out thrift_temp --gen java {}
|
|
#mkdir -p ./src/main/java/com/jmfy/thrift/idl/
|
|
#rm -rf ./src/main/java/com/jmfy/thrift/idl/*
|
|
#cp -rf ./thrift_temp/com/jmfy/thrift/idl/* ./src/main/java/com/jmfy/thrift/idl/
|
|
|
|
mvn clean package
|
|
|
|
|
|
if [ ! -z ${ip} ];then
|
|
scp ${BASE_DIR}/target/delivery-server-1.0-SNAPSHOT.jar ${ip}:/data/jieling/delivery-server/
|
|
scp ${BASE_DIR}/pay_reboot.sh ${ip}:/data/jieling/delivery-server/pay_reboot.sh
|
|
fi
|