class Onset < Formula desc "Version control where nobody waits and nothing gets lost" homepage "https://upstream.codes/onset" version "0.9.3" license "Apache-2.0" on_macos do on_arm do url "https://downloads.coline.dev/onset/0.9.3/onset-0.9.3-darwin-arm64.tar.gz" sha256 "ffec6012ef99f9512841894af335309292b6f13173a629650fa4e7f91c558b4e" end on_intel do url "https://downloads.coline.dev/onset/0.9.3/onset-0.9.3-darwin-x64.tar.gz" sha256 "00555fcb41802b171f34c5be09347abd6176d83ccefbd4885ebce8593973e010" end end on_linux do on_arm do url "https://downloads.coline.dev/onset/0.9.3/onset-0.9.3-linux-arm64.tar.gz" sha256 "35a56a3af01b356c559c187262227224338a686f70000ac43f838e7f1f7fde5f" end on_intel do url "https://downloads.coline.dev/onset/0.9.3/onset-0.9.3-linux-x64.tar.gz" sha256 "dfbeac9a2b987c8c4cc324cabfc4a140ec53e134fd79050b0f91322458ae7e30" end end def install bin.install "on" bin.install "onset-server" if File.exist?("onset-server") generate_completions_from_executable(bin/"on", "completions") end test do assert_match version.to_s, shell_output("#{bin}/on --version") end end