Skip to content

release-upload-buildinfo: replace version-comparison channel gating with metadata flags#27074

Merged
daxian-dbw merged 3 commits into
masterfrom
copilot/fix-release-upload-buildinfo
Mar 20, 2026
Merged

release-upload-buildinfo: replace version-comparison channel gating with metadata flags#27074
daxian-dbw merged 3 commits into
masterfrom
copilot/fix-release-upload-buildinfo

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

Fix #27075
Fix #26713

  • Read current file and understand the structure
  • Remove dead $currentReleaseTag assignment (before $buildInfo is parsed)
  • Remove $stableReleaseTag / version-comparison variables and logic
  • Gate stable.json upload via StableRelease.PublishToChannels metadata flag
  • Always create/publish version-specific {Major}-{Minor}.json for non-preview builds
  • Introduce VersionSpecificBuildInfoFile and UploadVersionSpecific build variables
  • Update the Azure upload step to include version-specific upload section
  • Update task condition to include UploadVersionSpecific
  • Add comment explaining that metadata.json version tags may not be current and must not be used for channel decisions
  • Add $isPreview and $isStable boolean variables right after $fileName is set, and use them in place of string comparisons throughout the script

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…l gating

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
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.

I think it would make it more readable to add a $isStable and $isPreview right after we get the file name. @copilot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 99868e8. Added $isPreview and $isStable booleans immediately after $fileName is set, and replaced all $fileName -eq "preview.json" / $fileName -eq "stable.json" comparisons with them throughout the script.

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI requested a review from TravisEz13 March 20, 2026 14:17
Comment thread .pipelines/templates/release-upload-buildinfo.yml
@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Mar 20, 2026
@TravisEz13 TravisEz13 marked this pull request as ready for review March 20, 2026 14:20
@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners March 20, 2026 14:20
Copilot AI review requested due to automatic review settings March 20, 2026 14:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the release build-info upload pipeline template to base channel upload decisions on explicit tools/metadata.json publish flags (instead of comparing version tags), and to always publish a version-specific buildinfo file for non-preview releases.

Changes:

  • Replace stable channel gating based on version comparison with StableRelease.PublishToChannels.
  • Add creation/upload of a version-specific {Major}-{Minor}.json file for stable (non-preview) builds.
  • Introduce VersionSpecificBuildInfoFile and UploadVersionSpecific variables and incorporate them into the Azure upload step + task condition.

@daxian-dbw daxian-dbw enabled auto-merge (squash) March 20, 2026 16:54
@daxian-dbw daxian-dbw merged commit 8947ed6 into master Mar 20, 2026
43 of 44 checks passed
@TravisEz13 TravisEz13 deleted the copilot/fix-release-upload-buildinfo branch March 26, 2026 22:19
adityapatwardhan pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.4.x-Done Backport-7.5.x-Done Backport-7.6.x-Done CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

6 participants