File tree Expand file tree Collapse file tree 3 files changed +55
-25
lines changed
Expand file tree Collapse file tree 3 files changed +55
-25
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- source scripts/adjustEnvVars.sh
3+ set -o pipefail
4+
5+
6+ source scripts/adjustEnvVars.sh || exit $?
47
58
69#
@@ -12,15 +15,15 @@ PREBUILD=prebuilds/$KERNEL_NAME-$NODE_ARCH.tar.gz
1215
1316
1417# Clean products previously to create them
15- rm -rf ${PRODUCTS[@]} || exit 11
18+ rm -rf ${PRODUCTS[@]} || exit 1
1619
1720
1821#
1922# Build cross toolchain for all supported platforms
2023#
2124
22- PLATFORM=pc_qemu_32 npm run build && PLATFORM=pc_qemu_32 npm test || exit 1
23- PLATFORM=pc_qemu_64 npm run build && PLATFORM=pc_qemu_64 npm test || exit 2
25+ PLATFORM=pc_qemu_32 npm run build && PLATFORM=pc_qemu_32 npm test || exit 10
26+ PLATFORM=pc_qemu_64 npm run build && PLATFORM=pc_qemu_64 npm test || exit 11
2427
2528
2629#
@@ -30,13 +33,19 @@ PLATFORM=pc_qemu_64 npm run build && PLATFORM=pc_qemu_64 npm test || exit 2
3033STEP_DIR=$PREBUILD
3134
3235mkdir -p prebuilds &&
33- tar -cf - ${PRODUCTS[@]} | gzip > $PREBUILD || err 12
36+ tar -cf - ${PRODUCTS[@]} | gzip > $PREBUILD || err 20
3437
3538
3639#
3740# Upload release to GitHub
3841#
3942
4043if [ " $GITHUB_TOKEN " ]; then
41- prebuild --upload-all $GITHUB_TOKEN || exit 20
44+ prebuild --upload-all $GITHUB_TOKEN || exit 30
4245fi
46+
47+ #
48+ # Restore binary symlinks
49+ #
50+
51+ scripts/symlinks.sh || exit 40
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ set -o pipefail
44
55
66DOWNLOAD=https://github.com/NodeOS/nodeos-cross-toolchain/releases/download/v{version}/{platform}-{arch}.tar.gz
7- SYMLINKS=(addr2line ar as c++filt elfedit gprof ld ld.bfd nm objcopy objdump \
8- ranlib readelf size strings strip c++ cpp g++ gcc gcov gcov-tool)
97
108
119#
@@ -14,23 +12,8 @@ SYMLINKS=(addr2line ar as c++filt elfedit gprof ld ld.bfd nm objcopy objdump \
1412
1513prebuild-install -d $DOWNLOAD || npm run build || exit 10
1614
17-
18- # If host platform is not based on musl, don't create un-prefixed symlinks
19- readlink /lib/ld-linux.so.2 | grep musl || exit 0
20-
21-
2215#
23- # Update the bypass symbolic links to point to the cross-toolchain binaries
16+ # Restore binary symlinks
2417#
2518
26- PLATFORM=
27- CPU=
28-
29- source scripts/adjustEnvVars.sh || exit $?
30-
31- mkdir -p bin || exit 20
32-
33- for i in " ${SYMLINKS[@]} "
34- do
35- ln -sf $TARGET -$i bin/$i || exit 21
36- done
19+ scripts/symlinks.sh || exit 20
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -o pipefail
4+
5+
6+ SYMLINKS=(addr2line ar as c++filt elfedit gprof ld ld.bfd nm objcopy objdump \
7+ ranlib readelf size strings strip c++ cpp g++ gcc gcov gcov-tool)
8+
9+
10+ #
11+ # (Re-)create the bypass symlinks to the native platform binaries
12+ #
13+
14+ for i in " ${SYMLINKS[@]} "
15+ do
16+ cp bypass.js bin/$i || exit 1
17+ done
18+
19+
20+ # If host platform is not based on musl, don't create un-prefixed symlinks
21+ readlink /lib/ld-linux.so.2 | grep musl || exit 0
22+
23+
24+ #
25+ # Update the bypass symbolic links to point to the cross-toolchain binaries
26+ #
27+
28+ PLATFORM=
29+ CPU=
30+
31+ source scripts/adjustEnvVars.sh || exit $?
32+
33+ mkdir -p bin || exit 10
34+
35+ for i in " ${SYMLINKS[@]} "
36+ do
37+ ln -sf $TARGET -$i bin/$i || exit 11
38+ done
You can’t perform that action at this time.
0 commit comments