From 17a6e12e02e817df2888233db4d5e35d55b3e0b9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 07:59:32 +0200 Subject: [PATCH] tfs: create env.ps1 --- build/tfs/win32/1_build.ps1 | 13 +++---------- scripts/env.ps1 | 5 +++++ 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 scripts/env.ps1 diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 88b39fea4f9..9ee8909ad8b 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -3,23 +3,16 @@ Param( [string]$vsoPAT ) +. .\scripts\env.ps1 . .\build\tfs\win32\lib.ps1 +# Create a _netrc file to download distro dependencies # In order to get _netrc to work, we need a HOME variable setup $env:HOME=$env:USERPROFILE - -$env:npm_config_disturl="https://atom.io/download/electron" -$env:npm_config_target="1.6.6" -$env:npm_config_runtime="electron" -$env:npm_config_cache="$HOME/.npm-electron" -$env:npm_config_arch="ia32" -# mkdir -p "$env:npm_config_cache" - -# Create a _netrc file to download distro dependencies "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install } + exec { & npm install --arch ia32 } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword diff --git a/scripts/env.ps1 b/scripts/env.ps1 new file mode 100644 index 00000000000..3d34630f391 --- /dev/null +++ b/scripts/env.ps1 @@ -0,0 +1,5 @@ +$env:npm_config_disturl="https://atom.io/download/electron" +$env:npm_config_target=(node -p "require('./package.json').electronVersion") +$env:npm_config_runtime="electron" +$env:npm_config_cache="$HOME/.npm-electron" +New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null \ No newline at end of file