Skip to content

Commit

Permalink
spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
ckairen committed Mar 25, 2024
1 parent c1a93b9 commit aaaa46d
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions eng/tools/publish-to-npm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ try {
}

$publishToNpm = $false
if(!$basicDeployment) {
if($registry -eq 'https://registry.npmjs.org/'){
$publishToNpm = $true
}
else{
Write-Host "Choosing Private Devops Feed Deployment"
$npmReg = $regAuth.replace("registry/","");
$env:NPM_TOKEN=$npmToken
npm config set $regAuth`:username=azure-sdk
npm config set $regAuth`:_password=`$`{NPM_TOKEN`}
npm config set $regAuth`:email=not_set
npm config set $npmReg`:username=azure-sdk
npm config set $npmReg`:_password=`$`{NPM_TOKEN`}
npm config set $npmReg`:email=not_set
if (!$basicDeployment) {
if ($registry -eq 'https://registry.npmjs.org/') {
$publishToNpm = $true
}
else {
Write-Host "Choosing Private Devops Feed Deployment"
$npmReg = $regAuth.replace("registry/","");
$env:NPM_TOKEN=$npmToken
npm config set $regAuth`:username=azure-sdk
npm config set $regAuth`:_password=`$`{NPM_TOKEN`}
npm config set $regAuth`:email=not_set
npm config set $npmReg`:username=azure-sdk
npm config set $npmReg`:_password=`$`{NPM_TOKEN`}
npm config set $npmReg`:email=not_set
}
}
else {
Expand Down Expand Up @@ -145,7 +145,7 @@ try {
exit 1
}
$addTagCheck = 0
if(($additionalTag) -and ($additionalTag -ne $tag)) {
if (($additionalTag) -and ($additionalTag -ne $tag)) {
$nameAndVersion = $p.Project.name + "@" + $p.Project.version
Write-Host "npm dist-tag add $($nameAndVersion) $additionalTag"
npm dist-tag add $nameAndVersion $additionalTag
Expand All @@ -161,12 +161,13 @@ try {
write-host "Copy $($p.TarGz) to $packagesToPublishPath"
New-Item -ItemType Directory -Path $packagesToPublishPath -Force
Copy-Item -Path $($p.TarGz) -Destination $packagesToPublishPath -Force
} elseif ($additionalTag -ne $tag) {
}
elseif ($additionalTag -ne $tag) {
npm dist-tag add "$($p.Project.name)@$($p.Project)" $additionalTag
. $(Build.SourcesDirectory)/eng/scripts/npm-admin-tasks.ps1 -taskType AddTag -packageName $p.Project.name -pkgVersion $p.Project.version -tagName $AdditionalTag -npmToken $(azure-sdk-npm-token)
}
}
else{
else {
Write-Host "Skipping package publish $($p.TarGz)"
}
}
Expand Down

0 comments on commit aaaa46d

Please sign in to comment.