Skip to content

Commit b8fdb03

Browse files
committed
Added script to configure node_gyp (nodejs/node-gyp#1933)
1 parent 4290497 commit b8fdb03

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
THEIA_ELECTRON_SKIP_REPLACE_FFMPEG: 1
3636
displayName: Build
3737
- bash: |
38+
./electron/packager/conf-node-gyp.sh
3839
yarn --cwd ./electron/packager/
3940
yarn --cwd ./electron/packager/ package
4041
env:

electron/packager/conf-node-gyp.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
npm install --global node-gyp@6.0.1
4+
5+
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then
6+
npm config set node_gyp "`npm prefix -g`\node_modules\node-gyp\bin\node-gyp.js"
7+
else
8+
npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js"
9+
fi
10+
11+
echo "npm config get node_gyp -> `npm config get node_gyp`"

electron/packager/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const depcheck = require('depcheck');
1313
* and append the short commit SHA.
1414
*/
1515
function versionInfo() {
16-
if (typeof process.env.RELEASE_TAG === 'undefined' || /* Azure -> */ process.env.RELEASE_TAG === '$(Release.Tag)') {
16+
if (typeof process.env.RELEASE_TAG === 'undefined' || !process.env.RELEASE_TAG || /* Azure -> */ process.env.RELEASE_TAG === '$(Release.Tag)') {
1717
return {
1818
version: `${targetVersion()}-${currentCommitish()}`,
1919
release: false
@@ -97,4 +97,4 @@ function collectUnusedDependencies(pathToProject = process.cwd()) {
9797
})
9898
}
9999

100-
module.exports = { versionInfo, collectUnusedDependencies };
100+
module.exports = { versionInfo, collectUnusedDependencies };

0 commit comments

Comments
 (0)