Use test registry in npmrc for alpha packages (#4666)
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
This commit is contained in:
parent
822063c838
commit
b9d83aa5b8
@ -45,6 +45,14 @@ function NpmInstallForProject([string]$workingDirectory) {
|
||||
|
||||
Write-Host("Copying package.json from $replacementPackageJson")
|
||||
Copy-Item -Path $replacementPackageJson -Destination "package.json" -Force
|
||||
|
||||
$useAlphaNpmRegistry = (Get-Content $replacementPackageJson -Raw).Contains("-alpha.")
|
||||
|
||||
if($useAlphaNpmRegistry) {
|
||||
Write-Host "Package.json contains '-alpha.' in the version, Creating .npmrc using public/azure-sdk-for-js-test-autorest feed."
|
||||
"registry=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/ `n`nalways-auth=true" | Out-File '.npmrc'
|
||||
}
|
||||
|
||||
npm install --no-lock-file
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user