docker.sh
565 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
38
39
#!/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
rm -rf public/dist
fi
if [[ $1 == "test1" ]] || [[ $1 == "test2" ]] || [[ $1 == "test3" ]]
then
yarn build
fi
node-prune
tar -czf yohobuy-node.tar.gz *