Skip to content

Commit

Permalink
fix: workflow doesn't support matrix exclusions (#1374)
Browse files Browse the repository at this point in the history
* fix: workflow doesn't support matrix exclusions

* fix: revert strip.js for locating index.node

* feat: add changelog

Co-authored-by: Mark Nardi <[email protected]>
  • Loading branch information
Tuditi and MarkNerdi996 authored Aug 19, 2022
1 parent ff7a45e commit e9cc4b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changes/revert-strip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Striping index.node from the correct path
6 changes: 4 additions & 2 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ jobs:
exclude:
# GLIBC_2.28 is only available with a newer ubuntu version
- os: ubuntu-18.04
node-version: ['18.x']
node-version: '18.x'
# ubuntu-18.04 is needed for node 14.x and 16.x
- os: ubuntu-latest
node-version: ['14.x', '16.x']
node-version: '14.x'
- os: ubuntu-latest
node-version: '16.x'

steps:
- uses: actions/checkout@v2
Expand Down
17 changes: 2 additions & 15 deletions bindings/nodejs/scripts/strip.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ const { spawnSync } = require('child_process');

// Based on https://github.com/prebuild/prebuild/blob/master/strip.js

if (process.platform === 'win32') {
// strip doesn't exist on Windows
return;
}

const binaryPath = resolve(__dirname, '../build/Release/index.node');
const binaryPath = resolve(__dirname, '../index.node');
const stripArgs = process.platform === 'darwin' ? '-Sx' : '--strip-all';
const { status } = spawnSync('strip', [stripArgs, binaryPath], {
stdio: 'inherit',
});

if (status === null) {
process.exit(1);
} else if (status > 0) {
process.exit(status);
}
spawnSync('strip', [stripArgs, binaryPath], { stdio: 'inherit' });

0 comments on commit e9cc4b7

Please sign in to comment.