-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
📎 Create Homebrew formula #209
Comments
Please assign me to the issue. |
I've got a working formula, but we should wait for the next release of the CLI (which renames class Biome < Formula
desc "Toolchain of the web"
homepage "https://biomejs.dev/"
url "https://github.com/biomejs/biome.git",
tag: "cli/v1.1.2",
revision: "cde65810dc5a5fa0be30da9ddfe27d2769e71731"
license "MIT"
depends_on "rust" => :build
def install
cd "crates/rome_cli" do
system "cargo", "install", "--bin", "biome", *std_cargo_args
end
end
test do
unformatted = "const x = 1"
# Write the unformatted code to a file
(testpath/"test.js").write(unformatted)
# Run the formatter
system "#{bin}/biome", "format", "--semicolons=always", "--write", (testpath/"test.js")
# Read the formatted file
formatted = (testpath/"test.js").read
expected = "const x = 1;"
# Assert that the expected and formatted match
assert_match expected, formatted
end
end TodoOnce a new release is made for the CLI:
|
How will the publishing process work with homebrew? At the moment we compile for production using GitHub actions, and they contain environment variables required during the release (version, release flags, etc.) |
This can either be done manually after each release by running the following command: brew bump-formula-pr \
--strict biome \
--tag="cli/vX.Y.Z" \
--revision="<commit sha>" Or can be automated using the following GitHub Action, which wraps the previous script. https://github.com/marketplace/actions/homebrew-bump-formula Homebrew will create pre-compiled versions of the formula to distribute. If there are specific flags that should be passed to the compilation step, we should add them to the formula. To be clear, we would not directly share compiled binaries. |
We might be able to add a |
The following livecheck block will detect new versions of the CLI.
livecheck do
url :stable
regex(/^cli\/v(\d+(?:\.\d+)+)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"] || release["prerelease"]
match = release["tag_name"]&.match(regex)
next if match.blank?
match[1]
end
end
end |
v1.2.0 of the CLI has been released, so I'll proceed with this. |
Biome CLI v1.2.2 is now available on Homebrew. https://formulae.brew.sh/formula/biome I'll keep this issue open for now because we still need to integrate the formula version bumping strategy in the release workflow. For reference, here's the formula PR: Homebrew/homebrew-core#143196 |
Can we close this @nhedger ? What's missing? |
I still have to update the workflow to automatically bump the version on homebrew's side when we release a new version. |
Closing in favor of #568 |
Description
This task tracks the publication of Biome to Homebrew.
Discussed in #197
rome_cli
tobiome_cli
#211 to be mergedThe text was updated successfully, but these errors were encountered: