File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 27
27
" nodeos-nodejs" ,
28
28
" usrbinenv"
29
29
],
30
+ "testDependencies" : [
31
+ " nodeos-barebones" ,
32
+ " qemu" ,
33
+ " suppose"
34
+ ],
30
35
"devDependencies" : {
31
36
"exclfs" : " piranna/exclfs" ,
32
37
"jocker" : " ^0.0.0" ,
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ BUILD="npm run build --no-spin"
10
10
TEST=" npm test"
11
11
12
12
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
+ 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
16
16
17
17
18
18
#
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ PATH=$TOOLCHAIN/bin:$PATH
22
22
(
23
23
cd $TOOLCHAIN
24
24
25
+ # We can't use `--arch=$NODE_ARCH` because `prebuild` would install a
26
+ # cross-compiler for a diferent host platform, so we set the desired target
27
+ # platform using environment variables instead
25
28
BITS=$BITS CPU=$CPU MACHINE=$MACHINE npm install --production || exit 1
26
29
) || exit $?
27
30
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" `
4
+ BAREBONES=` node -p " require('nodeos-barebones')" `
3
5
4
- npm install nodeos-barebones qemu suppose
5
6
6
- cd ` node -p " require('nodeos-barebones') " `
7
+ source $TOOLCHAIN /scripts/adjustEnvVars.sh || exit $?
7
8
8
- npm install --production
9
+
10
+ buildDependencies testDependencies || exit 1
11
+
12
+ (
13
+ cd $BAREBONES || exit 2
14
+
15
+ npm install --arch=$NODE_ARCH --production || exit 3
16
+ ) || exit $?
You can’t perform that action at this time.
0 commit comments