Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure word alpha is present in dev build #16089

Merged
merged 8 commits into from
Jul 1, 2021
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
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
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
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