Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prebuildify and node-gyp-build #625

Merged
merged 7 commits into from
Apr 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:
- name: arm
os: linux
node_js: node
env: [BUILD_CMD=prebuild-arm, BUILD_GROUP=arm]
env: [BUILD_CMD=prebuild-arm, BUILD_GROUP=arm, NPM_CONFIG_IGNORE_SCRIPTS=1]
if: tag is present
- name: alpine
os: linux
node_js: node
env: [BUILD_CMD=prebuild-alpine, BUILD_GROUP=alpine, NPM_CONFIG_IGNORE_SCRIPTS=1]
if: tag is present

script:
Expand All @@ -42,7 +47,7 @@ after_success:

before_deploy:
- export ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$BUILD_GROUP.tar.gz"
- npm run $BUILD_CMD
- NPM_CONFIG_IGNORE_SCRIPTS= npm run $BUILD_CMD
- file prebuilds/*/*
- tar -zcvf "$ARCHIVE_NAME" -C prebuilds .

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ $ git submodule update --init --recursive
2. Push to GitHub: `git push --follow-tags`
3. Wait for Travis and AppVeyor builds to complete
4. Download prebuilds into `./prebuilds`: `npm run download-prebuilds`
5. Optionally verify loading a prebuild: `rimraf build && npm t`
5. Optionally verify loading a prebuild: `npm run test-prebuild`
6. Optionally verify which files npm will include: `irish-pub`
7. Add changelog to the GitHub release
8. Finally: `npm publish`
Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "standard && nyc tape test/*-test.js",
"test-gc": "npx -n=--expose-gc tape test/{cleanup,iterator-gc,chained-batch-gc}*-test.js",
"test-electron": "electron test/electron.js",
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"rebuild": "node-gyp rebuild",
"prebuild": "prebuildify -t 8.14.0 --napi --strip",
Expand All @@ -17,20 +18,22 @@
"dependency-check": "dependency-check . test/*.js bench/*.js",
"prepublishOnly": "npm run dependency-check",
"prebuild-arm": "npm run prebuild-linux-armv7 && npm run prebuild-linux-arm64 && npm run prebuild-android-armv7 && npm run prebuild-android-arm64",
"prebuild-linux-armv7": "IMAGE=linux-armv7 ./scripts/cross-compile",
"prebuild-linux-arm64": "IMAGE=linux-arm64 ./scripts/cross-compile",
"prebuild-android-armv7": "IMAGE=android-armv7 ./scripts/cross-compile",
"prebuild-android-arm64": "IMAGE=android-arm64 ./scripts/cross-compile"
"prebuild-linux-armv7": "IMAGE=linux-armv7 ./scripts/cross-compile --tag-armv",
"prebuild-linux-arm64": "IMAGE=linux-arm64 ./scripts/cross-compile --tag-armv",
"prebuild-android-armv7": "IMAGE=android-armv7 ./scripts/cross-compile --tag-armv",
"prebuild-android-arm64": "IMAGE=android-arm64 ./scripts/cross-compile --tag-armv",
"prebuild-alpine": "IMAGE=alpine ./scripts/cross-compile --tag-libc"
vweevers marked this conversation as resolved.
Show resolved Hide resolved
},
"dependencies": {
"abstract-leveldown": "~6.0.3",
"fast-future": "~1.0.2",
"napi-macros": "~1.8.1",
"node-gyp-build": "~3.8.0"
"node-gyp-build": "~4.1.0"
},
"devDependencies": {
"async": "^2.0.1",
"coveralls": "^3.0.2",
"cross-env": "^5.2.0",
"delayed": "^1.0.1",
"dependency-check": "^3.3.0",
"du": "~0.1.0",
Expand All @@ -44,7 +47,7 @@
"node-gyp": "^4.0.0",
"nyc": "^14.0.0",
"optimist": "~0.6.1",
"prebuildify": "prebuild/prebuildify#override-platform",
"prebuildify": "^3.0.0",
"prebuildify-ci": "^1.0.4",
"readfiletree": "~0.0.1",
"rimraf": "^2.6.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/cross-compile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ DOCKER_USER="node"
if [[ "$TRAVIS" == "true" ]]; then DOCKER_USER="travis"; fi

exec docker run -u ${DOCKER_USER} --rm -v $(pwd):/app prebuild/${IMAGE} \
bash -c "npm i --ignore-scripts && npx prebuildify -t 8.14.0 --napi --strip"
npm run prebuild -- $@