diff --git a/BuildConfigGen/dev.sh b/BuildConfigGen/dev.sh index 32335148cd21..c0096cd5fce8 100755 --- a/BuildConfigGen/dev.sh +++ b/BuildConfigGen/dev.sh @@ -32,7 +32,7 @@ function detect_platform_and_runtime_id () fi elif [[ "$CURRENT_PLATFORM" == 'darwin' ]]; then - DETECTED_RUNTIME_ID='osx-x64' + DETECTED_RUNTIME_ID="osx-$(uname -m)" fi } diff --git a/_generated/UsePythonVersionV0_Node20/.npmrc b/_generated/UsePythonVersionV0_Node20/.npmrc index 5fca0d518be7..d5c7fef620a3 100644 --- a/_generated/UsePythonVersionV0_Node20/.npmrc +++ b/_generated/UsePythonVersionV0_Node20/.npmrc @@ -1 +1,5 @@ scripts-prepend-node-path=true + +registry=https://pkgs.dev.azure.com/mseng/PipelineTools/_packaging/PipelineTools_PublicPackages/npm/registry/ + +always-auth=true \ No newline at end of file diff --git a/make-util.js b/make-util.js index bb91e0a6e03c..4d105614298c 100644 --- a/make-util.js +++ b/make-util.js @@ -377,8 +377,18 @@ var installNodeAsync = async function (nodeVersion) { var nodeUrl = 'https://nodejs.org/dist'; switch (platform) { case 'darwin': - var nodeArchivePath = await downloadArchiveAsync(nodeUrl + '/' + nodeVersion + '/node-' + nodeVersion + '-darwin-x64.tar.gz'); - addPath(path.join(nodeArchivePath, 'node-' + nodeVersion + '-darwin-x64', 'bin')); + var arch = run('uname -m') + var nodeMajorVersionNumber = parseInt(nodeVersion.match(/\d+/)[0], 10); + if (isNaN(nodeMajorVersionNumber)) { + console.debug("Couldn't parse Node version; falling back to use version Node 14."); + nodeMajorVersionNumber = 14 + } + if (nodeMajorVersionNumber < 16) { // arm64 support started since node16 + arch = 'x64' + } + + var nodeArchivePath = await downloadArchiveAsync(nodeUrl + '/' + nodeVersion + '/node-' + nodeVersion + '-darwin-' + arch + '.tar.gz'); + addPath(path.join(nodeArchivePath, 'node-' + nodeVersion + '-darwin-' + arch, 'bin')) break; case 'linux': var nodeArchivePath = await downloadArchiveAsync(nodeUrl + '/' + nodeVersion + '/node-' + nodeVersion + '-linux-x64.tar.gz');