Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions eng/pipelines/templates/stages/archetype-js-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ stages:
- ${{if ne(artifact.skipPublishDevFeed, 'true')}}:
- pwsh: |
$detectedPackageName=Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}/*.tgz
Write-Host "Detected package name: $($detectedPackageName)"
if ($detectedPackageName -notmatch "-alpha")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add this check in the build stage as well if SetDevVersion is set to true.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this will happen but if the package name ends up with "-alpha" in it, this will no catch that case but I suspect that is not likely.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not build alpha version of private packages so adding this check at build time will fail for them without more checks to skip them as well.

{
Write-Error "Found non alpha version artifact to publish as dev version. Failing publish step. VersionPolicy should be client or core in rush.json to get alpha version build."
exit 1
}
echo "##vso[task.setvariable variable=Package.Archive]$detectedPackageName"
if ('$(Build.Repository.Name)' -eq 'Azure/azure-sdk-for-js') {
$npmToken="$(azure-sdk-npm-token)"
Expand Down