forked from decentraland/sdk7-goerli-plaza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all.sh
executable file
·40 lines (28 loc) · 900 Bytes
/
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
#!/bin/bash
echo "Installing and building all folders"
rm -rf node_modules
# first install the parametrized package
if [ ! -z $SDK_VERSION ]; then
npm i $SDK_VERSION @dcl-sdk/utils@latest --no-save --legacy-peer-deps
else
npm i @dcl/sdk@next @dcl-sdk/utils@latest --legacy-peer-deps
fi
# then the rest of the dependencies
npm install --legacy-peer-deps
npm run sync
npm ls @dcl/sdk
npm ls @dcl-sdk/utils
# clean the git state of package.json(s)
git add */package.json package.json
# run a check to ensure all parcels are updated and also dcl-workspace.json
npm run update-parcels
# and fail if git state is dirty
git diff --ignore-cr-at-eol --exit-code .
if [[ $? -eq 1 ]]; then
echo "GIT IS ON DIRTY STATE 🔴 Please run 'npm run update-parcels' locally and commit"
exit 1
fi
# ensure all packages are on sync
npm run sync && npm run test
# and lastly build scenes
npm run build