diff --git a/.changes/revert-strip.md b/.changes/revert-strip.md new file mode 100644 index 000000000..3fc0ac671 --- /dev/null +++ b/.changes/revert-strip.md @@ -0,0 +1,5 @@ +--- +"nodejs-binding": patch +--- + +Striping index.node from the correct path diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index ef7d685fa..27e5f3c0c 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -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 diff --git a/bindings/nodejs/scripts/strip.js b/bindings/nodejs/scripts/strip.js index 9b6f440c3..fda1df268 100644 --- a/bindings/nodejs/scripts/strip.js +++ b/bindings/nodejs/scripts/strip.js @@ -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' });