diff --git a/coursier.rb b/coursier.rb index d39804f..dfc706c 100644 --- a/coursier.rb +++ b/coursier.rb @@ -2,9 +2,15 @@ class Coursier < Formula desc "Launcher for Coursier" homepage "https://get-coursier.io" - url "https://github.com/coursier/coursier/releases/download/v2.1.25-M2/cs-x86_64-apple-darwin.gz" version "2.1.25-M2" - sha256 "0b51059d28338351e87374f34349d43a00dd445428ad09f0c5db1d8bc7c99997" + on_intel do + url "https://github.com/coursier/coursier/releases/download/v2.1.25-M2/cs-x86_64-apple-darwin.gz" + sha256 "0b51059d28338351e87374f34349d43a00dd445428ad09f0c5db1d8bc7c99997" + end + on_arm do + url "https://github.com/coursier/coursier/releases/download/v2.1.25-M2/cs-aarch64-apple-darwin.gz" + sha256 "008e10f23ecf59e7a7ee51eeff6be5c971199a95ccc35a8099a451009f6adf0b" + end option "without-shell-completions", "Disable shell completion installation" @@ -17,7 +23,12 @@ class Coursier < Formula depends_on "openjdk" def install - bin.install "cs-x86_64-apple-darwin" => "cs" + on_intel do + bin.install "cs-x86_64-apple-darwin" => "cs" + end + on_arm do + bin.install "cs-aarch64-apple-darwin" => "cs" + end resource("jar-launcher").stage { bin.install "coursier" } unless build.without? "shell-completions"