forked from matter-labs/zksync-wallet-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli-dev.sh
60 lines (55 loc) · 1.4 KB
/
cli-dev.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
CATEGORY="$1"
ACTION="$2"
if [ $CATEGORY == "clean" ]; then
if [ $ACTION == "yarn" ]; then
echo "Yarn garbage collection started"
echo ""
echo " - dropping node_modules folder..."
rm -rf node_modules
echo " Done"
echo " - removing .yarn cached files..."
rm -rf .yarn/cache .yarn/build-state.yml .yarn/install-state.gz
echo " Done"
echo " - cleaning yarn cache..."
yarn cache clean --all
printf " Done\n\n"
echo "All done!"
elif [ $ACTION == "nuxt" ]; then
echo "Nuxtjs garbage collection started"
echo ""
echo " - dropping .nuxt folder..."
rm -rf .nuxt
echo " Done"
echo " - cleaning the files inside public folder..."
rm -rf public/*
printf " Done\n\n"
echo "All done!"
fi
fi
if [ $CATEGORY == "ci" ]; then
echo "Yarn pre-deploy garbage collection started"
echo ""
bash cli-dev.sh clean nuxt
echo ""
echo ""
bash cli-dev.sh clean yarn
echo ""
echo "Running yarn install (without modifying yarn.lock)"
yarn install --check-cache
echo "Done"
fi
if [ $CATEGORY == "dev" ]; then
if [ $ACTION == "force" ]; then
echo "Rebuilding..."
echo ""
bash cli-dev.sh ci
fi
echo "Generating static html"
echo ""
yarn ci:build:rinkeby
echo "Deploying to the firebase host for a day"
echo ""
firebase hosting:channel:deploy totest --only stage-mainnet --expires 1d
echo ""
fi