Skip to content

Commit

Permalink
Merge 1c861db into 85298ef
Browse files Browse the repository at this point in the history
  • Loading branch information
ckairen authored Apr 30, 2024
2 parents 85298ef + 1c861db commit f29ada9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions eng/pipelines/templates/stages/archetype-js-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ stages:
Artifact: ${{artifact}}
Registry: ${{parameters.Registry}}
PathToArtifacts: $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}
Tag: "$(Tag)"
AdditionalTag: "$(AdditionalTag)"
Tag: $(Tag)
AdditionalTag: $(AdditionalTag)
- pwsh: >
write-host "$(Package.Archive)"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extends:
Artifacts: ${{ parameters.Artifacts }}
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
RunUnitTests: ${{ parameters.RunUnitTests }}
RunUnitTests: false
MatrixConfigs:
- ${{ each config in parameters.MatrixConfigs }}:
- ${{ config }}
Expand Down
21 changes: 11 additions & 10 deletions eng/pipelines/templates/steps/npm-release-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:

steps:
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
- ${{if eq(parameters.Registry, 'https://registry.npmjs.org/')}}:
- ${{ if eq(parameters.Registry, 'https://registry.npmjs.org/') }}:
- task: EsrpRelease@6
inputs:
displayName: 'Publish ${{parameters.Artifact.name}} to ESRP'
Expand All @@ -23,15 +23,16 @@ steps:
DomainTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
ProductStateField: ${{parameters.Tag}}

- ${{if ne(parameters.AdditionalTag, '')}}:
- task: PowerShell@2
displayName: Add Additional Tag
inputs:
targetType: filePath
filePath: eng/tools/publish-to-npm.ps1
arguments: -addTag $true -pathToArtifacts ${{parameters.PathToArtifacts}} -accessLevel "public" -tag "${{parameters.AdditionalTag}}" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token)
pwsh: true
condition: succeeded()
- ${{ if ne(parameters.AdditionalTag, '') }}:
- pwsh: Write-host "additional tag '${{parameters.AdditionalTag}}'"
- task: PowerShell@2
displayName: Add Additional Tag
inputs:
targetType: filePath
filePath: eng/tools/publish-to-npm.ps1
arguments: -addTag $true -pathToArtifacts ${{parameters.PathToArtifacts}} -accessLevel "public" -tag "${{parameters.AdditionalTag}}" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token)
pwsh: true
condition: succeeded()

- ${{ else }}:
- task: PowerShell@2
Expand Down
4 changes: 3 additions & 1 deletion eng/tools/publish-to-npm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ try {
Write-Host "npm dist-tag add $nameAndVersion $tag"
npm dist-tag add $nameAndVersion $tag
}
if ($additionalTag -ne "" && $additionalTag -ne $tag) {
if (![string]::IsNullOrWhitespace($additionalTag) -and ($additionalTag -ne $tag)) {
Write-Host "Tag: '$tag'"
Write-Host "Additional tag: '$additionalTag'"
Write-Host "Adding additional tag for package"
Write-Host "npm dist-tag add $nameAndVersion $additionalTag"
npm dist-tag add $nameAndVersion $additionalTag
Expand Down

0 comments on commit f29ada9

Please sign in to comment.