forked from Joystream/joystream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·55 lines (44 loc) · 1.32 KB
/
build.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.32 KB
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
#!/usr/bin/env bash
set -e
yarn
yarn workspace @joystream/types build
yarn workspace @joystream/cd-schemas generate:all
yarn workspace @joystream/cd-schemas build
yarn workspace @joystream/cli build
yarn workspace query-node-root build
yarn workspace storage-node build
# Not strictly needed during development, we run "yarn workspace pioneer start" to start
# a dev instance, but will show highlight build issues
yarn workspace pioneer build
if ! command -v docker-compose &> /dev/null
then
echo "docker-compose not found, skipping docker build!"
else
# Build joystream/apps docker image
docker-compose build pioneer
# Optionally build joystream/node docker image
# TODO: Try to fetch a cached joystream/node image
# if one is found matching code shasum instead of building
while true
do
read -p "Rebuild joystream/node docker image? (y/N): " answer2
case $answer2 in
[yY]* ) docker-compose build joystream-node
break;;
[nN]* ) break;;
* ) break;;
esac
done
fi
# Build cargo crates: native binaries joystream/node, wasm runtime, and chainspec builder.
while true
do
read -p "Compile joystream node native binary? (y/N): " answer1
case $answer1 in
[yY]* ) yarn cargo-checks
yarn cargo-build
break;;
[nN]* ) break;;
* ) break;;
esac
done