File tree Expand file tree Collapse file tree 5 files changed +76
-7
lines changed Expand file tree Collapse file tree 5 files changed +76
-7
lines changed Original file line number Diff line number Diff line change 22out /
33node_modules /
44npm-debug.log
5+ prebuilds /
Original file line number Diff line number Diff line change 22 "name" : " nodeos-usersfs" ,
33 "version" : " 1.0.0-RC3.0" ,
44 "scripts" : {
5+ "BigRedButton" : " scripts/BigRedButton" ,
56 "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)" ,
68 "test" : " scripts/test" ,
79 "unbuild" : " scripts/unbuild"
810 },
3436 " slap"
3537 ],
3638 "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" : {
3766 "bin-man" : " ^0.2.0" ,
3867 "bin-pwd" : " ^0.0.0" ,
3968 "davius" : " ^0.0.1" ,
4574 "logon" : " ^0.1.3" ,
4675 "node-bin-getty" : " NodeOS/node-bin-getty" ,
4776 "node-wget" : " ^0.4.2" ,
77+ "nodeos-cross-toolchain" : " ^1.0.0-RC3.0" ,
78+ "nodeos-nodejs" : " ^6.9.4" ,
4879 "nodeos-reverse-proxy" : " ^0.1.0" ,
4980 "npm" : " ^4.0.5" ,
5081 "nsh" : " piranna/nsh" ,
5182 "ntp-client" : " ^0.5.3" ,
5283 "palmtree" : " ^2.5.0" ,
5384 "performance" : " ^1.1.1" ,
85+ "prebuild" : " ^6.0.0" ,
5486 "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" ,
6087 "qemu" : " ^2.8.0" ,
88+ "slap" : " ^0.1.61" ,
6189 "tar-fs" : " ^1.15.0"
6290 },
6391 "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"
44CLR=" \e[0m"
55
66
7- TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" `
7+ TOOLCHAIN=` node -p " require('nodeos-cross-toolchain')" ` || exit 1
88
99source $TOOLCHAIN /scripts/adjustEnvVars.sh &&
1010source scripts/utils.sh || exit $?
@@ -23,9 +23,12 @@ PATH=$TOOLCHAIN/bin:$PATH
2323# Define steps paths
2424#
2525
26+ NODE_PLATFORM=linux
27+
2628OBJ_ROOT=$OBJECTS /root
2729OBJ_NODEOS=$OBJECTS /nodeos
2830OUT_DIR=` pwd` /out/$CPU .tar.gz
31+ PREBUILD=prebuilds/$NODE_PLATFORM -$NODE_ARCH .tar.gz
2932
3033
3134#
151154STEP_DIR=$OUT_DIR
152155
153156if [[ ! -f $STEP_DIR ]]; then
157+ rmStep $PREBUILD
158+
154159 mkdir -p ` dirname $STEP_DIR `
155160
156161 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
165170
166171
167172echo -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 $?
22
33NPMi=' CC=$TARGET-gcc \
44 CXX=$TARGET-g++ \
You can’t perform that action at this time.
0 commit comments