Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
ln -s "$GITHUB_WORKSPACE" "$(brew --repository)/Library/Taps/bandwidth/homebrew-tap"

- name: Audit formula
run: brew audit band
run: brew audit --strict band
48 changes: 8 additions & 40 deletions Formula/band.rb
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class Band < Formula
desc "Bandwidth CLI — manage voice, messaging, numbers, and more from the command line"
desc "Manage voice, messaging, numbers, and more from the command-line"
homepage "https://github.com/Bandwidth/cli"
version "0.1.0-beta"
url "https://github.com/Bandwidth/cli/archive/refs/tags/v0.1.0-beta.tar.gz"
sha256 "39b7570fee4e90d4b2fd0102294d25f9c536e4e875a90ce3f399e695e492071d"
license "MIT"

on_macos do
if Hardware::CPU.intel?
url "https://github.com/Bandwidth/cli/releases/download/v0.1.0-beta/band_0.1.0-beta_darwin_amd64.tar.gz"
sha256 "f6e5650629ac1cdcba87978a466b81a30589ae6de6b6e140d36900b6bfbcc6a7"

define_method(:install) do
bin.install "band"
end
end
if Hardware::CPU.arm?
url "https://github.com/Bandwidth/cli/releases/download/v0.1.0-beta/band_0.1.0-beta_darwin_arm64.tar.gz"
sha256 "91c0be841b511dbd584ef259e3413716b49e0c5d495de0b6c6a02eb565ce16c4"

define_method(:install) do
bin.install "band"
end
end
end
depends_on "go" => :build

on_linux do
if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
url "https://github.com/Bandwidth/cli/releases/download/v0.1.0-beta/band_0.1.0-beta_linux_amd64.tar.gz"
sha256 "7f5bbf512582e4f42a5934e32ba89815dc1230110852096c4f350e94151596e5"
define_method(:install) do
bin.install "band"
end
end
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/Bandwidth/cli/releases/download/v0.1.0-beta/band_0.1.0-beta_linux_arm64.tar.gz"
sha256 "123f0dcf7c2dcb1df928a90dc6f651e2f57b7b0637b2e38ac3965e074b028be0"
define_method(:install) do
bin.install "band"
end
end
def install
ldflags = "-s -w -X github.com/Bandwidth/cli/cmd.version=#{version}"
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/band"
end

test do
system "#{bin}/band", "version"
assert_match "band version", shell_output("#{bin}/band version")
end
end