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

Publish prebuilds to npm #34

Merged
merged 8 commits into from
Jun 19, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ jobs:
- script: npm run prebuild
displayName: Test prebuild

- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to publish the artifacts if we're not on a release tag?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have to, just seemed useful to always store it in azure devops in case we want to download the prebuilds and test it or something

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ok, sure.

- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
condition: and(succeeded(), eq(variables['publish_artifacts'], 'true'))
inputs:
artifactName: prebuilds
pathtoPublish: '$(System.DefaultWorkingDirectory)/prebuilds'
- task: PublishBuildArtifacts@1
DeMoorJasper marked this conversation as resolved.
Show resolved Hide resolved
displayName: Publish Artifacts
condition: and(succeeded(), eq(variables['publish_artifacts'], 'true'))
inputs:
artifactName: prebuilds
pathtoPublish: '$(System.DefaultWorkingDirectory)/prebuilds'
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
inputs:
gitHubConnection: parcel
repositoryName: parcel-bundler/watcher
assets: $(System.DefaultWorkingDirectory)/prebuilds/@parcel/*
assets: $(System.DefaultWorkingDirectory)/prebuilds/*
- task: Npm@1
displayName: NPM Release
inputs:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const binding = require('bindings')('watcher.node');
const binding = require('node-gyp-build')(__dirname);
const path = require('path');

function normalizeOptions(dir, opts = {}) {
Expand Down
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@
"type": "git",
"url": "https://github.com/parcel-bundler/watcher.git"
},
"files": [
"src",
"prebuilds",
"index.js",
"package.json",
"binding.gyp",
"README.md"
],
"scripts": {
"install": "prebuild-install -r napi || node-gyp rebuild",
"prebuild": "prebuild -t 3 -r napi --strip",
"prebuild": "prebuildify --napi --strip --tag-libc -t 10.0.0",
"format": "prettier --write \"./**/*.{js,json,md}\"",
"install": "node-gyp-build",
"rebuild": "node-gyp rebuild --debug",
"test": "mocha"
},
"engines": {
Expand All @@ -27,17 +36,16 @@
]
},
"dependencies": {
"bindings": "^1.5.0",
"lint-staged": "^10.0.8",
"node-addon-api": "^1.6.2",
"prebuild-install": "^5.2.5"
"node-addon-api": "^3.0.0",
"node-gyp-build": "^4.2.1"
},
"devDependencies": {
"husky": "^4.2.3",
"fs-extra": "^7.0.1",
"husky": "^4.2.3",
"mocha": "^6.0.2",
"prebuild": "^8.2.1",
"prettier": "^1.19.1"
"prettier": "^1.19.1",
"prebuildify": "^4.0.0"
},
"binary": {
"napi_versions": [
Expand Down