docker.sh
532 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
wordir=$2
cd $wordir
rm -rf yohobuy-node.tar.gz
if [[ $1 == "yoho-gray" ]]
then
yarn --production=false
else
yarn
fi
if [[ $1 == "yoho-gray" ]]
then
rm -rf public/dist
yarn build
if [[ $? == 1 ]]
then
echo "build failed"
exit 1
fi
yarn yo-cli upload -f
if [[ $? == 1 ]]
then
echo "file upload failed"
exit 1
fi
fi
if [[ $1 == "TEST1" ]] || [[ $1 == "TEST2" ]] || [[ $1 == "TEST3" ]]
then
yarn build
fi
tar -czvf yohobuy-node.tar.gz *