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