Formula/hub.rb (60 lines of code) (raw):

# typed: false # frozen_string_literal: true # This file was generated by GoReleaser. DO NOT EDIT. class Hub < Formula desc "Hub CLI is stack composition and lifecycle tool." homepage "https://superhub.io/" version "1.0.10" license "GPLv3" on_macos do if Hardware::CPU.arm? url "https://github.com/agilestacks/hub/releases/download/v1.0.10/hub_Darwin_arm64.tar.gz" sha256 "7705b3debaa9961b31982f97a7219e62536704ccf53f48dafdac3017669b0a1e" def install bin.install "hub" end end if Hardware::CPU.intel? url "https://github.com/agilestacks/hub/releases/download/v1.0.10/hub_Darwin_x86_64.tar.gz" sha256 "1b7e97662fe760be0194aa40c35e41cfc85df4636492ea765c82d76723829909" def install bin.install "hub" end end end on_linux do if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? url "https://github.com/agilestacks/hub/releases/download/v1.0.10/hub_Linux_arm64.tar.gz" sha256 "8452e8e48f1a625ae5db56590f589032f0ab1449371a85f75c80b4c80190a521" def install bin.install "hub" end end if Hardware::CPU.intel? url "https://github.com/agilestacks/hub/releases/download/v1.0.10/hub_Linux_x86_64.tar.gz" sha256 "02d71496d1197db0809976a51aadc3151410cd501242f27a42e31e2bd5866744" def install bin.install "hub" end end end head "https://github.com/asibot/hub" depends_on "jq" depends_on "yq" depends_on "npm" => :optional def post_install hub_home = Pathname.new "#{Dir.home}/.hub" unless hub_home.exist? system "#{Formula["hub"].opt_bin}/hub", "extensions", "install" end end def caveats; <<~EOS hub version hub help hub elaborate hub.yaml params.yaml -o hub.yaml.elaborate hub deploy hub.yaml.elaborate -e NAME=stage EOS end test do output = shell_output("#{bin}/hub version").chomp assert output.start_with?("Hub CLI git ") system "false" end end