Skip to content

Commit ebbf1c3

Browse files
committed
generate all versions & publish and install using prebuild
1 parent 55b0723 commit ebbf1c3

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules/
44
out/
55
bin/
66
npm-debug.log
7+
prebuilds/

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"strip": "bin/strip"
1919
},
2020
"scripts": {
21-
"install": "scripts/preinstall && scripts/build",
22-
"postinstall": "scripts/postinstall",
21+
"BigRedButton": "scripts/BigRedButton",
22+
"build": "scripts/preinstall && scripts/build && scripts/postinstall",
23+
"install": "prebuild --download https://github.com/NodeOS/nodeos-cross-toolchain/releases/download/{version}/{platform}-{arch}.tar.gz",
2324
"test": "scripts/test",
2425
"unbuild": "scripts/unbuild"
2526
},
@@ -28,11 +29,18 @@
2829
"CLFS",
2930
"embedded",
3031
"toolchain",
31-
"cross"
32+
"cross",
33+
"gcc",
34+
"musl",
35+
"linux",
36+
"binutils"
3237
],
3338
"author": "Jesús Leganés Combarro \"piranna\" <piranna@gmail.com>",
3439
"license": "MIT",
3540
"dependencies": {
41+
"prebuild": "piranna/prebuild"
42+
},
43+
"devDpendencies": {
3644
"download-manager": "^0.0.15",
3745
"fs-extra": "^0.26.5"
3846
}

scripts/BigRedButton

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Build cross toolchain for all supported platforms
5+
#
6+
7+
PLATFORM=pc_qemu_32 npm run build || exit 1
8+
PLATFORM=pc_qemu_64 npm run build || exit 2
9+
10+
#
11+
# Pack toolchain in a node-gyp compatible way
12+
#
13+
14+
mkdir -p prebuilds &&
15+
tar -cf - out | gzip > prebuilds/linux-x64.tar.gz || exit 3
16+
17+
#
18+
# Upload release to GitHub
19+
#
20+
21+
if [ "$GITHUB_TOKEN" ]; then
22+
prebuild --upload-all $GITHUB_TOKEN || exit 4
23+
fi

0 commit comments

Comments
 (0)