File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
pipelines/templates/stages Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ stages:
8585 inputs :
8686 targetType : filePath
8787 filePath : " eng/tools/publish-to-npm.ps1"
88- arguments : ' -pathToArtifacts $(Package.Archive) -accessLevel "public" -tag $( Tag) -additionalTag "$( AdditionalTag)" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token)'
88+ arguments : ' -pathToArtifacts $(Package.Archive) -accessLevel "public" -tag $env: Tag -additionalTag $env: AdditionalTag -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token)'
8989 pwsh : true
9090
9191 - ${{if ne(artifact.skipPublishDocMs, 'true')}} :
Original file line number Diff line number Diff line change 11param (
22 $pathToArtifacts ,
33 $accessLevel ,
4- $tag ,
4+ $tag = " " ,
55 $additionalTag = " " ,
66 $registry ,
77 $npmToken ,
@@ -124,8 +124,17 @@ try {
124124
125125 foreach ($p in $packageList ) {
126126 if ($p.Publish ) {
127- Write-Host " npm publish $ ( $p.TarGz ) --access=$accessLevel --registry=$registry --always-auth=true --tag=$tag "
128- npm publish $p.TarGz -- access= $accessLevel -- registry= $registry -- always- auth= true -- tag= $tag
127+ if ($tag )
128+ {
129+ Write-Host " npm publish $ ( $p.TarGz ) --access=$accessLevel --registry=$registry --always-auth=true --tag=$tag "
130+ npm publish $p.TarGz -- access= $accessLevel -- registry= $registry -- always- auth= true -- tag= $tag
131+ }
132+ else
133+ {
134+ Write-Host " npm publish $ ( $p.TarGz ) --access=$accessLevel --registry=$registry --always-auth=true"
135+ npm publish $p.TarGz -- access= $accessLevel -- registry= $registry -- always- auth= true
136+ }
137+
129138 if ($LastExitCode -ne 0 ) {
130139 Write-Host " npm publish failed with exit code $LastExitCode "
131140 exit 1
You can’t perform that action at this time.
0 commit comments