Added script to configure node_gyp (nodejs/node-gyp#1933)

This commit is contained in:
Miro Spönemann 2020-01-07 15:31:12 +01:00
parent 4290497edc
commit b8fdb03433
3 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,7 @@ jobs:
THEIA_ELECTRON_SKIP_REPLACE_FFMPEG: 1
displayName: Build
- bash: |
./electron/packager/conf-node-gyp.sh
yarn --cwd ./electron/packager/
yarn --cwd ./electron/packager/ package
env:

View File

@ -0,0 +1,11 @@
#!/bin/sh
npm install --global node-gyp@6.0.1
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then
npm config set node_gyp "`npm prefix -g`\node_modules\node-gyp\bin\node-gyp.js"
else
npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js"
fi
echo "npm config get node_gyp -> `npm config get node_gyp`"

View File

@ -13,7 +13,7 @@ const depcheck = require('depcheck');
* and append the short commit SHA.
*/
function versionInfo() {
if (typeof process.env.RELEASE_TAG === 'undefined' || /* Azure -> */ process.env.RELEASE_TAG === '$(Release.Tag)') {
if (typeof process.env.RELEASE_TAG === 'undefined' || !process.env.RELEASE_TAG || /* Azure -> */ process.env.RELEASE_TAG === '$(Release.Tag)') {
return {
version: `${targetVersion()}-${currentCommitish()}`,
release: false
@ -97,4 +97,4 @@ function collectUnusedDependencies(pathToProject = process.cwd()) {
})
}
module.exports = { versionInfo, collectUnusedDependencies };
module.exports = { versionInfo, collectUnusedDependencies };