File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,30 @@ BUILD="npm run build --no-spin"
1010TEST=" npm test"
1111
1212
13- eval MACHINE=pc BITS=32 $BUILD && MACHINE=pc BITS=32 $TEST || exit 1
14- eval MACHINE=pc BITS=64 $BUILD && MACHINE=pc BITS=64 $TEST || exit 2
15- eval MACHINE=raspi2 $BUILD || exit 3
13+ TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" `
14+
15+ source $TOOLCHAIN /scripts/adjustEnvVars.sh || exit $?
16+
17+
18+ NODE_PLATFORM=linux
19+
20+
21+ #
22+ # Pack `nodeos-initramfs` in a node-gyp compatible way
23+ #
24+ function pack-prebuild {
25+ # TODO use Node.js arch instead of explicit CPUs
26+
27+ STEP_DIR=prebuilds/$NODE_PLATFORM -$NODE_ARCH .tar.gz
28+
29+ mkdir -p ` dirname $STEP_DIR ` &&
30+ tar -cf - out/$CPU out/latest | gzip > $STEP_DIR || err 50
31+ }
32+
33+
34+ ( export MACHINE=pc BITS=32 ; $BUILD && $TEST && pack-prebuild ) || exit 1
35+ ( export MACHINE=pc BITS=64 ; $BUILD && $TEST && pack-prebuild ) || exit 2
36+ ( export MACHINE=raspi2 ; $BUILD && pack-prebuild ) || exit 3
1637
1738
1839#
Original file line number Diff line number Diff line change @@ -150,15 +150,3 @@ ln -sf $OUT_NAME out/latest || err 41
150150
151151
152152echo -e " ${GRN} Successfully built 'initramfs'${CLR} "
153-
154-
155- #
156- # Pack `nodeos-initramfs` in a node-gyp compatible way
157- #
158-
159- # TODO use Node.js arch instead of explicit CPUs and move to BigRedButton
160-
161- STEP_DIR=$PREBUILD
162-
163- mkdir -p ` dirname $STEP_DIR ` &&
164- tar -cf - out/$OUT_NAME out/latest | gzip > $STEP_DIR || err 50
You can’t perform that action at this time.
0 commit comments