Fixes #356. Instead of downloading a node binary with our closure serialization code linked-in, this PR instead publishes the `nativeruntime.node` produced by the NodeJS SDK build as part of the SDK. This has a number of advantages. First, it is vastly more easy to develop closure.cc in this configuration. Second, we have the ability to ship different `nativeruntime.node`s side-by-side, paving the way for enabling future versions of Node. Third, we don't have to stay in the business of shipping custom builds of Node, although we do still need to ship a version of Node with minor modifications in order for Windows to still work.
16 lines
576 B
PowerShell
16 lines
576 B
PowerShell
Set-StrictMode -Version 2.0
|
|
$ErrorActionPreference="Stop"
|
|
|
|
$NodeArch="x64"
|
|
$NodeVersion="6.10.2"
|
|
$NodeBase="custom_node\node"
|
|
$NodeExe="custom_node\node\node.exe"
|
|
$NodeZipName="$NodeBase\node-$NodeVersion-win-$NodeArch.zip"
|
|
if (Test-Path $NodeExe) {
|
|
Write-Output "skipping node.js executable download, as it already exists"
|
|
} else {
|
|
echo "node.js binary does not exist, downloading..."
|
|
aws s3 cp --only-show-errors "s3://eng.pulumi.com/node/node-$NodeVersion-win-$NodeArch.zip" $NodeZipName
|
|
7z x -o"$NodeBase" $NodeZipName
|
|
Remove-Item -Force $NodeZipName
|
|
} |