Skip to content

Commit

Permalink
gh: update 2.55.0 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Sep 3, 2024
1 parent 1dc1b87 commit 37fce16
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Formula/g/gh.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
class Gh < Formula
desc "GitHub command-line tool"
homepage "https://cli.github.com/"
url "https://github.com/cli/cli/archive/refs/tags/v2.55.0.tar.gz"
sha256 "f467cfdaedd372a5c20bb0daad017a0b3f75fa25179f1e4dcdc1d01ed59e62a5"
license "MIT"
head "https://github.com/cli/cli.git", branch: "trunk"

livecheck do
url :stable
strategy :github_latest
end

bottle do
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/gh-2.55.0"
sha256 cellar: :any_skip_relocation, aarch64_linux: "c8e09f224a879d1de1e89ef29f0403489803be898d469417145338fa4c97c40e"
end

depends_on "go" => :build

deny_network_access! [:postinstall, :test]

def install
gh_version = if build.stable?
version.to_s
else
Utils.safe_popen_read("git", "describe", "--tags", "--dirty").chomp
end

with_env(
"GH_VERSION" => gh_version,
"GO_LDFLAGS" => "-s -w -X main.updaterEnabled=cli/cli",
) do
system "make", "bin/gh", "manpages"
end
bin.install "bin/gh"
man1.install Dir["share/man/man1/gh*.1"]
generate_completions_from_executable(bin/"gh", "completion", "-s")
end

test do
assert_match "gh version #{version}", shell_output("#{bin}/gh --version")
assert_match "Work with GitHub issues", shell_output("#{bin}/gh issue 2>&1")
assert_match "Work with GitHub pull requests", shell_output("#{bin}/gh pr 2>&1")
end
end

0 comments on commit 37fce16

Please sign in to comment.