-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(brew): improve if hardware structures #5741
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
Conversation
Deploying goreleaser with
|
Latest commit: |
ea9ae43
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ba11f02e.goreleaser.pages.dev |
Branch Preview URL: | https://rb.goreleaser.pages.dev |
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 pull request refactors the hardware conditional logic in the brew template for Linux packages to simplify the structure and improve clarity.
- Consolidates nested hardware checks into combined one-line conditions
- Adjusts header indentation in the template for a more concise format
Files not reviewed (19)
- internal/pipe/brew/testdata/TestFullFormulae.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_block.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_download_strategy.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_require.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/default.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/default_gitlab.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/git_remote.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/open_pr.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/valid_repository_templates.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/with_header.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/with_many_headers.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v1.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v2.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v3.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v4.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv5.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv6.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv7.rb.golden: Language not supported
Comments suppressed due to low confidence (2)
internal/pipe/brew/templates/linux_packages.rb:4
- Verify that combining the nested 'if' statements into this single line preserves the intended short-circuit behavior and does not introduce unintended side effects.
if Hardware::CPU.intel? and Hardware::CPU.is_64_bit?
internal/pipe/brew/templates/linux_packages.rb:14
- Confirm that reducing the indentation from 10 to 8 spaces aligns with the desired formatting of the output, as a change might affect the rendered header layout.
{{- join .Headers | indent 8 }}
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 refactors the hardware architecture conditional checks in the Linux packages template to simplify the logic and improve clarity. Key changes include:
- Combining nested Intel CPU checks into a single condition.
- Separating ARM64 and ARM CPU checks using combined logical expressions.
- Adjusting header indentation formatting.
Files not reviewed (19)
- internal/pipe/brew/testdata/TestFullFormulae.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_block.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_download_strategy.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/custom_require.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/default.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/default_gitlab.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/git_remote.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/open_pr.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/valid_repository_templates.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/with_header.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestFullPipe/with_many_headers.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v1.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v2.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v3.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleAmd64Versions/v4.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv5.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv6.rb.golden: Language not supported
- internal/pipe/brew/testdata/TestRunPipeForMultipleArmVersions/multiple_armv7.rb.golden: Language not supported
Comments suppressed due to low confidence (1)
internal/pipe/brew/templates/linux_packages.rb:14
- The header indentation was modified from 10 to 8 spaces. Please verify that this change produces the intended alignment in the final output.
{{- join .Headers | indent 8 }}
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5741 +/- ##
=======================================
Coverage 82.92% 82.92%
=======================================
Files 161 161
Lines 15916 15916
=======================================
Hits 13198 13198
Misses 2144 2144
Partials 574 574 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
closes https://github.com/orgs/goreleaser/discussions/5736