-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all.sh
executable file
·136 lines (126 loc) · 3.07 KB
/
build-all.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
function divider() {
printf %"$(tput cols)"s | tr " " "-"
printf "\n"
}
echo "# set yarn version..."
yarn set version 2.4.1
divider
# Run nvm only in local
if [ -z "$GITHUB_ACTIONS" ]; then
echo "# run nvm..."
source ~/.nvm/nvm.sh
nvm use
fi
divider
echo "# build verdaccio..."
cd "$DIR/verdaccio"
echo "# clean..."
git checkout -f openupm
git checkout -- yarn.lock
rm -f *.tgz
rm -rf build
echo "# patch yarn.lock..."
find . -name yarn.lock -exec sed -i "s#registry.verdaccio.org#registry.npmjs.org#g" {} \;
echo "# yarn install..."
yarn install --immutable
echo "# yarn code:build..."
yarn code:build
echo "# yarn npm pack..."
npm pack
# divider
# echo "# build aws-s3-storage..."
# cd "$DIR/monorepo"
# echo "# clean..."
# git checkout -f openupm
# git checkout -- yarn.lock
# lerna exec "git checkout -f -- yarn.lock package.json package-lock.json > /dev/null 2>&1 || true"
# lerna exec "rm -f *.tgz"
# lerna exec "rm -rf build"
# cd "$DIR/monorepo/plugins/aws-s3-storage"
# rm -f package-lock.json
# echo "# npm install..."
# npm install @types/node
# npm install
# echo "# npm run build..."
# npm run build
# echo "# npm pack..."
# npm pack
# git checkout -- package.json
# rm -f package-lock.json
divider
echo "# build storage-proxy..."
cd "$DIR/verdaccio-storage-proxy"
echo "# clean..."
rm -f *.tgz
rm -rf build
echo "# npm install..."
npm install
echo "# npm run build..."
npm run build
echo "# npm pack..."
npm pack
git checkout -- package-lock.json
divider
echo "# build redis-storage..."
cd "$DIR/verdaccio-redis-storage"
echo "# clean..."
rm -f *.tgz
rm -rf build
echo "# npm install..."
npm install
echo "# npm run build..."
npm run build
echo "# npm pack..."
npm pack
git checkout -- package-lock.json
divider
echo "# build redis-search-patch..."
cd "$DIR/verdaccio-redis-search-patch"
echo "# clean..."
rm -f *.tgz
rm -rf build
echo "# npm install..."
npm install
echo "# npm run build..."
npm run build
echo "# npm pack..."
npm pack
git checkout -- package-lock.json
divider
echo "# build verdaccio-install-counts..."
cd "$DIR/verdaccio-install-counts"
echo "# clean..."
rm -f *.tgz
rm -rf build
echo "# npm install..."
npm install
echo "# npm run build..."
npm run build
echo "# npm pack..."
npm pack
git checkout -- package-lock.json
divider
echo "# install..."
cd "$DIR/server"
echo "# clean..."
rm -f package-lock.json
git checkout -- package.json
echo "# install verdaccio..."
npm install -f "$DIR"/verdaccio/verdaccio-*.tgz
echo "# install aws-s3-storage..."
npm install verdaccio-aws-s3-storage@latest
echo "# install redis-storage..."
npm install -f "$DIR"/verdaccio-redis-storage/verdaccio-*.tgz
echo "# install redis-search-patch..."
npm install -f "$DIR"/verdaccio-redis-search-patch/verdaccio-*.tgz
echo "# install verdaccio-storage-proxy..."
npm install -f "$DIR"/verdaccio-storage-proxy/verdaccio-*.tgz
echo "# install verdaccio-install-counts..."
npm install -f "$DIR"/verdaccio-install-counts/verdaccio-*.tgz
echo "# install bunyan..."
npm install bunyan
divider
cat "$DIR"/server/package.json