You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
909 B

#!/bin/bash
#set -x
set -e
echoPrefix="\033[36m+"
echoSuffix="\033[0m"
codePath=/home/www/deploy/wms8_ztf_2
serverUrl=http://127.0.0.1:8098
deploy() {
# 更新代码
echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix"
cd $codePath/wms-ui-mobile
echo -e "$echoPrefix git checkout . $echoSuffix"
git checkout .
echo -e "$echoPrefix git pull $echoSuffix"
git pull
# 版本号
major='1'
minor=$(date +%Y%m%d)
patch=$(date +1%H%M%S | sed -e 's/^[[:space:]]*//')
version="$major.$minor.$patch"
echo -e "$echoPrefix 'export const version = '$version'' > src/version.ts $echoSuffix"
echo "export const version = '$version'" > src/version.ts
# build
}
cmd=$1
if [ "$cmd" == "deploy" ];then
deploy
else
echo "使用 deploy 命名打包pda"
fi
# 中通服 PDA
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/hua_wei_yun/09wms-ztf-pad-test.sh) [cmd]