Authored by jimi.ji

Update docker.sh

1 #!/bin/bash 1 #!/bin/bash
2 wordir=$2 2 wordir=$2
  3 +needBuild=$1
3 cd $wordir 4 cd $wordir
4 -rm -rf yoho-shop-manage.tar.gz  
5 -yarn  
6 -if [[ $1 == "test1" ]] || [[ $1 == "test2" ]] || [[ $1 == "test3" ]]  
7 -then  
8 -yarn build 5 +yarn --production=false
  6 +if [ "$needBuild" == "YES" ];then
  7 + yarn build
9 fi 8 fi
10 -tar -czf yoho-shop-manage.tar.gz *  
  9 +yarn build:node --build=$needBuild
  10 +/usr/local/bin/node-prune ./dist/node/node_modules