-
Notifications
You must be signed in to change notification settings - Fork 8.1k
[release/v7.6] Update the macos package name for preview releases to match the previous pattern #26562
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
[release/v7.6] Update the macos package name for preview releases to match the previous pattern #26562
Conversation
…ous pattern (PowerShell#26429) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the macOS package naming convention for PowerShell releases by removing the "powershell-preview" prefix and relying on the version string itself to identify preview releases (e.g., powershell-7.6.0-preview.6-osx-x64.pkg instead of powershell-preview-7.6.0-preview.6-osx-x64.pkg). This change aligns macOS package naming with other platforms and fixes validation failures in the CI/CD pipeline.
Key Changes:
- Removed "powershell-preview" prefix from macOS package names; preview status is now indicated by the version string (e.g., "7.6.0-preview.6")
- Updated pipeline validation regex to remove deprecated
osx.10.12support and enforce consistent dash placement between components - Added comprehensive test coverage to verify package naming conventions match pipeline validation rules
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/packaging/packaging.psm1 | Simplified package naming logic to remove preview prefix, relying on version string to indicate preview status |
| tools/packaging/releaseTests/macOSPackage.tests.ps1 | Added validation tests for package naming conventions including checks for correct format and prevention of deprecated x86_64 notation |
| .pipelines/templates/release-validate-packagenames.yml | Updated validation regex to remove deprecated macOS 10.12 pattern and ensure consistent component separation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Only LTS packages get a prefix in the name | ||
| # Preview versions are identified by the version string itself (e.g., 7.6.0-preview.6) | ||
| # Rebuild versions are also identified by the version string (e.g., 7.4.13-rebuild.5) | ||
| $Name = if($LTS) { | ||
| "powershell-lts" | ||
| } | ||
| elseif ($IsPreview) { | ||
| "powershell-preview" | ||
| } | ||
| else { | ||
| "powershell" | ||
| } |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code that sets $IsPreview = Test-IsPreview -Version $Version -IsLTS:$LTS has been removed, but $IsPreview is still referenced later in the function on lines 1170, 1186, and 1200. This will cause a runtime error when those lines are executed because $IsPreview will be undefined.
To fix this issue, add back the line that computes $IsPreview:
$IsPreview = Test-IsPreview -Version $Version -IsLTS:$LTSThis line should be added before line 1153 (before the $Name assignment), since the $IsPreview variable is needed later for determining the installation suffix and file paths.
Update test/packaging/macos/package-validation.tests.ps1 with correct regex pattern for macOS package naming validation. This file was missed in the original backport PR PowerShell#26562. Changes: - Remove (-preview|-lts)? pattern (no more -preview in names) - Update to (lts-)? - only LTS gets prefix - Update comments to reflect new naming convention - Match validation used in release-validate-packagenames.yml
Backport of #26429 to release/v7.6
Triggered by @adityapatwardhan on behalf of @TravisEz13
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Fixes GitHub Actions workflow failures in release-validate-packagenames.yml by updating deprecated package naming patterns. Updates packaging module to use consistent naming convention. Essential for proper package validation and build processes.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Verified by running affected workflows in fork environment. Added comprehensive package name validation tests including regex patterns that match the pipeline validation. Confirmed the updated naming convention works correctly for stable, preview, rebuild, and LTS packages.
Risk
REQUIRED: Check exactly one box.
Medium risk as it affects build infrastructure and package validation, but the change is well-tested and follows established patterns. The fix prevents build failures and ensures consistent package naming across releases.
Merge Conflicts
Simple addition conflict in tools/packaging/releaseTests/macOSPackage.tests.ps1 - added new package name validation test cases that were missing from the release branch. Applied exact changes from original PR.