From 42a1b1fa3c679b4c5fedc225decd4e674d82129f Mon Sep 17 00:00:00 2001 From: Joel Thorstensson Date: Sat, 29 Jun 2024 19:26:19 +0100 Subject: [PATCH] Multiple archs --- Formula/ceramic-one.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Formula/ceramic-one.rb b/Formula/ceramic-one.rb index db895fd..e3caf30 100644 --- a/Formula/ceramic-one.rb +++ b/Formula/ceramic-one.rb @@ -1,12 +1,17 @@ class CeramicOne < Formula desc "Implementation of the Ceramic protocol in Rust" homepage "https://ceramic.network" - url "https://github.com/ceramicnetwork/rust-ceramic/releases/download/v0.25.0/ceramic-one_aarch64-apple-darwin_brew-test.tar.gz" - sha256 "5470e699784ec7a679937ad4a0c5f19c7559b025b680b0c7206c78c7e4e58df5" + # Conditional URL and SHA based on architecture + if Hardware::CPU.intel? + url "https://github.com/ceramicnetwork/rust-ceramic/releases/download/v0.25.0/ceramic-one_x86_64-apple-darwin_brew-test.tar.gz" + sha256 "sha256_for_x86_64_version" + elsif Hardware::CPU.arm? + url "https://github.com/ceramicnetwork/rust-ceramic/releases/download/v0.25.0/ceramic-one_aarch64-apple-darwin_brew-test.tar.gz" + sha256 "5470e699784ec7a679937ad4a0c5f19c7559b025b680b0c7206c78c7e4e58df5" + end version "0.25.0" def install bin.install "ceramic-one" end end - \ No newline at end of file