09wms-ztf-pad-test.sh 911 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. #set -x
  3. set -e
  4. echoPrefix="\033[36m+"
  5. echoSuffix="\033[0m"
  6. codePath=/home/www/deploy/wms8_ztf_2
  7. serverUrl=http://127.0.0.1:8098
  8. deploy() {
  9. # 更新代码
  10. echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix"
  11. cd $codePath/wms-ui-mobile
  12. echo -e "$echoPrefix git checkout . $echoSuffix"
  13. git checkout .
  14. echo -e "$echoPrefix git pull $echoSuffix"
  15. git pull
  16. # 版本号
  17. major='1'
  18. minor=$(date +%Y%m%d)
  19. patch=$(date +1%H%M%S | sed -e 's/^[[:space:]]*//')
  20. version="$major.$minor.$patch"
  21. echo -e "$echoPrefix 'export const version = '$version'' >> src/version.ts $echoSuffix"
  22. echo "export const version = '$version'" >> src/version.ts
  23. # build
  24. }
  25. cmd=$1
  26. if [ "$cmd" == "deploy" ];then
  27. deploy
  28. else
  29. echo "使用 deploy 命名打包pda"
  30. fi
  31. # 中通服 PDA
  32. # bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/hua_wei_yun/09wms-ztf-pad-test.sh) [cmd]