Skip to content

Commit

Permalink
Release bun-v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
robobun committed Feb 1, 2025
1 parent f67b47f commit 21ea3bc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Formula/bun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Bun < Formula
desc "Incredibly fast JavaScript runtime, bundler, transpiler and package manager - all in one."
homepage "https://bun.sh/"
license "MIT"
version "1.2.1"
version "1.2.2"

livecheck do
url "https://github.com/oven-sh/bun/releases/latest"
Expand All @@ -12,24 +12,24 @@ class Bun < Formula
if OS.mac?
if Hardware::CPU.arm? || Hardware::CPU.in_rosetta2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-aarch64.zip"
sha256 "f903ca0206e8855f869be2f79908b8873c424e5b82ac86cc16d8cfc7dd39420b" # bun-darwin-aarch64.zip
sha256 "c4d58e06c5c33885b526f4d91a38ca9ebdb9fc3fb4cd547f7d3302055c98e41c" # bun-darwin-aarch64.zip
elsif Hardware::CPU.avx2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64.zip"
sha256 "89992faf415af2677d7233fe7b1276074aee843c0007deb26ea397c2d8aca438" # bun-darwin-x64.zip
sha256 "2f7d5a9cd90bc4f28449dc7b76a5e9eefade03e119f1cd4e3f941b92b26c6595" # bun-darwin-x64.zip
else
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64-baseline.zip"
sha256 "432f3128d5bd2444e60ce316d43a78ebbcd43a1d4bf3e1ad931cb58c6ff8cb26" # bun-darwin-x64-baseline.zip
sha256 "0f3b6e87d862d4016f8d95da177bc9136ca2e950f3d6d3d226a35d7061fff0f1" # bun-darwin-x64-baseline.zip
end
elsif OS.linux?
if Hardware::CPU.arm?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-aarch64.zip"
sha256 "8b789aa2fa9e1fd54031b6fd00f5bb9462f6bf0dc191aa4e6a48a08a67dd280c" # bun-linux-aarch64.zip
sha256 "d1dbaa3e9af24549fad92bdbe4fb21fa53302cd048a8f004e85a240984c93d4d" # bun-linux-aarch64.zip
elsif Hardware::CPU.avx2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-x64.zip"
sha256 "4380e39854cb4c8aadf237c8f5d27025649a2b49705da91ce33066de959d52e8" # bun-linux-x64.zip
sha256 "3f4efb8afd1f84ac2a98c04661c898561d1d35527d030cb4571e99b7c85f5079" # bun-linux-x64.zip
else
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-x64-baseline.zip"
sha256 "e4f2a8796ee2f4357e02f38747a3d80aa48a3deca80aa41b21a3b8841855bf1e" # bun-linux-x64-baseline.zip
sha256 "cad7756a6ee16f3432a328f8023fc5cd431106822eacfa6d6d3afbad6fdc24db" # bun-linux-x64-baseline.zip
end
else
odie "Unsupported platform. Please submit a bug report here: https://bun.sh/issues\n#{OS.report}"
Expand Down
48 changes: 48 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
class BunAT122 < Formula
desc "Incredibly fast JavaScript runtime, bundler, transpiler and package manager - all in one."
homepage "https://bun.sh/"
license "MIT"
version "1.2.2"

livecheck do
url "https://github.com/oven-sh/bun/releases/latest"
regex(%r{href=.*?/tag/bun-v?(\d+(?:\.\d+)+)["' >]}i)
end

if OS.mac?
if Hardware::CPU.arm? || Hardware::CPU.in_rosetta2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-aarch64.zip"
sha256 "c4d58e06c5c33885b526f4d91a38ca9ebdb9fc3fb4cd547f7d3302055c98e41c" # bun-darwin-aarch64.zip
elsif Hardware::CPU.avx2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64.zip"
sha256 "2f7d5a9cd90bc4f28449dc7b76a5e9eefade03e119f1cd4e3f941b92b26c6595" # bun-darwin-x64.zip
else
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-darwin-x64-baseline.zip"
sha256 "0f3b6e87d862d4016f8d95da177bc9136ca2e950f3d6d3d226a35d7061fff0f1" # bun-darwin-x64-baseline.zip
end
elsif OS.linux?
if Hardware::CPU.arm?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-aarch64.zip"
sha256 "d1dbaa3e9af24549fad92bdbe4fb21fa53302cd048a8f004e85a240984c93d4d" # bun-linux-aarch64.zip
elsif Hardware::CPU.avx2?
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-x64.zip"
sha256 "3f4efb8afd1f84ac2a98c04661c898561d1d35527d030cb4571e99b7c85f5079" # bun-linux-x64.zip
else
url "https://github.com/oven-sh/bun/releases/download/bun-v#{version}/bun-linux-x64-baseline.zip"
sha256 "cad7756a6ee16f3432a328f8023fc5cd431106822eacfa6d6d3afbad6fdc24db" # bun-linux-x64-baseline.zip
end
else
odie "Unsupported platform. Please submit a bug report here: https://bun.sh/issues\n#{OS.report}"
end

# TODO: to become an official formula we need to build from source
def install
bin.install "bun"
ENV["BUN_INSTALL"] = "#{bin}"
generate_completions_from_executable(bin/"bun", "completions")
end

def test
assert_match "#{version}", shell_output("#{bin}/bun -v")
end
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ brew install bun
If you want to install a specific release, you can include the version in the command. You can also view the list of releases [here](https://github.com/oven-sh/bun/releases).

```bash
brew install [email protected].1
brew install [email protected].2
```

## Upgrade
Expand Down

0 comments on commit 21ea3bc

Please sign in to comment.