Commit 78396c14 authored by 温海元's avatar 温海元

add qa-platform-ui

parent cc7a161c
project_name=$1
tag=$2
# tag=$2
target_user='root'
target_ip='172.29.2.3'
target_dir="/home/quant_group/${project_name}"
......@@ -8,20 +8,20 @@ qaapi='http://172.30.220.22:3003'
git_path=`curl -s "${qaapi}/proconfig/get_info?system_name=${project_name}&key=git_path"`
build_command=`curl -s "${qaapi}/proconfig/get_info?system_name=${project_name}&key=build_command"`
if [ ! -d "$project_name" ];then
echo "not exist"
git clone ${git_path}
cd ./${project_name}
ssh ${target_user}@${target_ip} "mkdir -p ${target_dir}/"
else
echo "exist"
cd ./${project_name}
git pull
fi
# if [ ! -d "$project_name" ];then
# echo "not exist"
# git clone ${git_path}
# cd ./${project_name}
# ssh ${target_user}@${target_ip} "mkdir -p ${target_dir}/"
# else
# echo "exist"
# cd ./${project_name}
# git pull
# fi
npm install
npm run build
supervisorctl restart ${project_name}
# npm install
# npm run build
# supervisorctl restart ${project_name}
# tar zcf ${tag}.dist.tgz ./dist/
# scp ${tag}.dist.tgz ${target_user}@${target_ip}:${target_dir}
......@@ -30,5 +30,12 @@ supervisorctl restart ${project_name}
# ssh ${target_user}@${target_ip} "rm -rf ${target_dir}/dist"
# ssh ${target_user}@${target_ip} "ln -s ${target_dir}/${tag}/dist/ ${target_dir}/dist"
# ssh ${target_user}@${target_ip} "rm -rf ${target_dir}/*.dist.tgz"
# rm -rf *.dist.tgz
ssh ${target_user}@${target_ip} "cd /home/quant_group/qa-platform-ui "
ssh ${target_user}@${target_ip} "git pull"
ssh ${target_user}@${target_ip} "npm install"
ssh ${target_user}@${target_ip} "npm run build"
ssh ${target_user}@${target_ip} "supervisorctl restart ${project_name}"
echo "done"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment