File tree 5 files changed +76
-7
lines changed
5 files changed +76
-7
lines changed Original file line number Diff line number Diff line change 2
2
out /
3
3
node_modules /
4
4
npm-debug.log
5
+ prebuilds /
Original file line number Diff line number Diff line change 2
2
"name" : " nodeos-usersfs" ,
3
3
"version" : " 1.0.0-RC3.0" ,
4
4
"scripts" : {
5
+ "BigRedButton" : " scripts/BigRedButton" ,
5
6
"build" : " scripts/build" ,
7
+ "install" : " prebuild-install -d https://github.com/NodeOS/nodeos-usersfs/releases/download/v{version}/{platform}-{arch}.tar.gz || (buildDependencies && npm run build)" ,
6
8
"test" : " scripts/test" ,
7
9
"unbuild" : " scripts/unbuild"
8
10
},
34
36
" slap"
35
37
],
36
38
"dependencies" : {
39
+ "builddependencies" : " 0.0.1" ,
40
+ "prebuild-install" : " ^2.1.0"
41
+ },
42
+ "buildDependencies" : [
43
+ " bin-man" ,
44
+ " bin-pwd" ,
45
+ " davius" ,
46
+ " dhcpjs" ,
47
+ " fs-extra" ,
48
+ " ifconfig" ,
49
+ " ip" ,
50
+ " loadtest" ,
51
+ " logon" ,
52
+ " node-bin-getty" ,
53
+ " node-wget" ,
54
+ " nodeos-cross-toolchain" ,
55
+ " nodeos-nodejs" ,
56
+ " nodeos-reverse-proxy" ,
57
+ " npm" ,
58
+ " nsh" ,
59
+ " ntp-client" ,
60
+ " palmtree" ,
61
+ " performance" ,
62
+ " pstree" ,
63
+ " slap"
64
+ ],
65
+ "devDependencies" : {
37
66
"bin-man" : " ^0.2.0" ,
38
67
"bin-pwd" : " ^0.0.0" ,
39
68
"davius" : " ^0.0.1" ,
45
74
"logon" : " ^0.1.3" ,
46
75
"node-bin-getty" : " NodeOS/node-bin-getty" ,
47
76
"node-wget" : " ^0.4.2" ,
77
+ "nodeos-cross-toolchain" : " ^1.0.0-RC3.0" ,
78
+ "nodeos-nodejs" : " ^6.9.4" ,
48
79
"nodeos-reverse-proxy" : " ^0.1.0" ,
49
80
"npm" : " ^4.0.5" ,
50
81
"nsh" : " piranna/nsh" ,
51
82
"ntp-client" : " ^0.5.3" ,
52
83
"palmtree" : " ^2.5.0" ,
53
84
"performance" : " ^1.1.1" ,
85
+ "prebuild" : " ^6.0.0" ,
54
86
"pstree" : " ^0.0.1" ,
55
- "slap" : " ^0.1.61"
56
- },
57
- "devDependencies" : {
58
- "nodeos-cross-toolchain" : " ^1.0.0-RC3.0" ,
59
- "nodeos-nodejs" : " ^6.9.4" ,
60
87
"qemu" : " ^2.8.0" ,
88
+ "slap" : " ^0.1.61" ,
61
89
"tar-fs" : " ^1.15.0"
62
90
},
63
91
"description" : " Generate a read-write users filesystem for NodeOS for demo purposses" ,
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # This script should generate all the possible build combinations of
4
+ # `nodeos-usersfs` and test them by checking the final files has the correct
5
+ # permissions
6
+
7
+
8
+ BUILD=" npm run build --no-spin"
9
+ TEST=" npm test"
10
+
11
+
12
+ eval MACHINE=pc BITS=32 $BUILD && $TEST || exit 1
13
+ eval MACHINE=pc BITS=64 $BUILD && $TEST || exit 2
14
+ eval MACHINE=raspi2 $BUILD && $TEST || exit 3
15
+
16
+
17
+ #
18
+ # Upload release to GitHub
19
+ #
20
+
21
+ if [ " $GITHUB_TOKEN " ]; then
22
+ prebuild --upload-all $GITHUB_TOKEN || exit 10
23
+ fi
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ GRN="\e[32m"
4
4
CLR=" \e[0m"
5
5
6
6
7
- TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" `
7
+ TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" ` || exit 1
8
8
9
9
source $TOOLCHAIN /scripts/adjustEnvVars.sh &&
10
10
source scripts/utils.sh || exit $?
@@ -23,9 +23,12 @@ PATH=$TOOLCHAIN/bin:$PATH
23
23
# Define steps paths
24
24
#
25
25
26
+ NODE_PLATFORM=linux
27
+
26
28
OBJ_ROOT=$OBJECTS /root
27
29
OBJ_NODEOS=$OBJECTS /nodeos
28
30
OUT_DIR=` pwd` /out/$CPU .tar.gz
31
+ PREBUILD=prebuilds/$NODE_PLATFORM -$NODE_ARCH .tar.gz
29
32
30
33
31
34
#
151
154
STEP_DIR=$OUT_DIR
152
155
153
156
if [[ ! -f $STEP_DIR ]]; then
157
+ rmStep $PREBUILD
158
+
154
159
mkdir -p ` dirname $STEP_DIR `
155
160
156
161
scripts/pack.js " $OBJECTS " nodeos 1 1 | gzip > $STEP_DIR || err 30
@@ -165,3 +170,15 @@ ln -sf $CPU.tar.gz out/latest || err 40
165
170
166
171
167
172
echo -e " ${GRN} Successfully built Layer-3 image 'usersfs'${CLR} "
173
+
174
+
175
+ #
176
+ # Pack `nodeos-usersfs` in a node-gyp compatible way
177
+ #
178
+
179
+ # TODO use Node.js arch instead of explicit CPUs and move to BigRedButton
180
+
181
+ STEP_DIR=$PREBUILD
182
+
183
+ mkdir -p ` dirname $STEP_DIR ` &&
184
+ tar -cf - out/$CPU .tar.gz | gzip > $STEP_DIR || err 100
Original file line number Diff line number Diff line change 1
- NODE_DIR=` node -p " require('nodeos-nodejs')" `
1
+ NODE_DIR=` node -p " require('nodeos-nodejs')" ` || exit $?
2
2
3
3
NPMi=' CC=$TARGET-gcc \
4
4
CXX=$TARGET-g++ \
You can’t perform that action at this time.
0 commit comments