From 6f06b8147a1de8197eac1fa17fbf7a0ea949d9d6 Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Thu, 21 Jan 2021 01:24:33 -0800 Subject: [PATCH 1/2] Replace only first azure- to generate package name --- eng/pipelines/templates/stages/archetype-js-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/stages/archetype-js-release.yml b/eng/pipelines/templates/stages/archetype-js-release.yml index d2a4ec408e03..87c7a2156fa2 100644 --- a/eng/pipelines/templates/stages/archetype-js-release.yml +++ b/eng/pipelines/templates/stages/archetype-js-release.yml @@ -152,7 +152,8 @@ stages: steps: - checkout: self - pwsh: | - $adjustedName = "${{artifact.name}}".Replace("azure-", "") + [regex]$pattern = "azure-" + $adjustedName = $pattern.replace("${{artifact.name}}", "", 1) Write-Host "##vso[task.setvariable variable=Documentation.Zip]$adjustedName" displayName: Set Documentation File Name - template: /eng/pipelines/templates/steps/stage-artifacts.yml From 51d65f5eeac45486856746685fc1c567390a2897 Mon Sep 17 00:00:00 2001 From: praveenkuttappan Date: Thu, 21 Jan 2021 10:31:28 -0800 Subject: [PATCH 2/2] Fix as per review comments --- eng/pipelines/templates/stages/archetype-js-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-js-release.yml b/eng/pipelines/templates/stages/archetype-js-release.yml index 87c7a2156fa2..5eb64850e6c5 100644 --- a/eng/pipelines/templates/stages/archetype-js-release.yml +++ b/eng/pipelines/templates/stages/archetype-js-release.yml @@ -152,8 +152,7 @@ stages: steps: - checkout: self - pwsh: | - [regex]$pattern = "azure-" - $adjustedName = $pattern.replace("${{artifact.name}}", "", 1) + $adjustedName = "${{artifact.name}}" -replace "^azure-", "" Write-Host "##vso[task.setvariable variable=Documentation.Zip]$adjustedName" displayName: Set Documentation File Name - template: /eng/pipelines/templates/steps/stage-artifacts.yml