forked from matter-labs/zksync-web-era-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli-dev.sh
32 lines (28 loc) · 811 Bytes
/
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
#!/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!"
fi
fi
if [ $CATEGORY == "ci" ]; then
echo "Yarn pre-deploy garbage collection started"
echo ""
bash cli-dev.sh clean yarn
echo ""
echo "Running yarn install (without modifying yarn.lock)"
yarn install --check-cache
echo "Done"
fi