class Onset < Formula desc "Version control where nobody waits and nothing gets lost" homepage "https://upstream.codes/onset" version "0.9.4" license "Apache-2.0" on_macos do on_arm do url "https://downloads.coline.dev/onset/0.9.4/onset-0.9.4-darwin-arm64.tar.gz" sha256 "bf572f0e2b0203504e57e4a7234657d45a78dd6453e808c0877dd35a968da849" end on_intel do url "https://downloads.coline.dev/onset/0.9.4/onset-0.9.4-darwin-x64.tar.gz" sha256 "a52e92c985274b218afd0416015ca2fedfb39a1f50e853cc02316b6fbf4a3a4b" end end on_linux do on_arm do url "https://downloads.coline.dev/onset/0.9.4/onset-0.9.4-linux-arm64.tar.gz" sha256 "d1101a07c1b5574842ceaa8b6560b7f48801214164cfee141bb0e7809930b4c7" end on_intel do url "https://downloads.coline.dev/onset/0.9.4/onset-0.9.4-linux-x64.tar.gz" sha256 "acb3cd4ec87f5911e09a95054e0d9d4f3aff5f248042b711bd87933fb038959e" 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