Skip to content

Fix brew#122

Merged
tomersein merged 6 commits into
mainfrom
fix-brew
Aug 16, 2025
Merged

Fix brew#122
tomersein merged 6 commits into
mainfrom
fix-brew

Conversation

@tomersein

Copy link
Copy Markdown
Contributor

Pull Request

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions

Copy link
Copy Markdown

Review Summary

This diff introduces a security policy, code of conduct, updates the Homebrew formula, and adds a script to automate Homebrew version updates. The changes generally improve the project's security posture and developer experience. However, the Homebrew formula update contains an anti-pattern and version management should be improved.

Critical issues

None

Suggestions

  1. Refactor Homebrew Formula for Version Management: The current approach of fetching the version dynamically within the formula is an anti-pattern. Homebrew formulas should have static version information. The update-brew-version.sh script is a good start, but should be automated and integrated with the release process (e.g., as part of a CI/CD pipeline). Manually running a script after a release is error-prone. The version = "0.1.1" declaration should be the canonical source of truth for the version.

  2. Enhance Security Policy: While a security policy is great, it could be improved by explicitly stating which components/dependencies are considered in scope.

  3. Improve Error Handling in update-brew-version.sh: The script uses set -e which is good, but adding more specific error handling, especially around the curl and sed commands, would make it more robust. Consider logging the error to stderr and exiting with a non-zero code.

  4. Add Tests for update-brew-version.sh: Automated tests for the script should be created to prevent regressions. A simple test could verify that the script correctly updates the version and SHA256 in the formula file after a dummy git tag is created.

  5. Consider using go install in Homebrew Formula: Currently, the Homebrew formula seems to just install a pre-built binary. Consider building and installing from source using go install within the Homebrew formula for more transparency and better security practices.

Quick wins or positive aspects

Adding a SECURITY.md and CODE_OF_CONDUCT.md is excellent and demonstrates a commitment to security and community. The update-brew-version.sh script automates a tedious task.

@codecov

codecov Bot commented Aug 12, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomersein
tomersein merged commit 696da25 into main Aug 16, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant