зеркало из https://github.com/github/homebrew-gh.git
Migrate gh formula to homebrew/core
Signed-off-by: Alexander Zigelski <ali@crunchtime.dev>
This commit is contained in:
Родитель
de8d7e7960
Коммит
046b2a14be
|
@ -1,43 +0,0 @@
|
|||
# This file was generated by GoReleaser. DO NOT EDIT.
|
||||
class Gh < Formula
|
||||
desc "GitHub CLI"
|
||||
homepage "https://github.com/cli/cli"
|
||||
version "0.11.1"
|
||||
bottle :unneeded
|
||||
|
||||
if OS.mac?
|
||||
url "https://github.com/cli/cli/releases/download/v0.11.1/gh_0.11.1_macOS_amd64.tar.gz"
|
||||
sha256 "6634c0cce8eba7a3d394d90cec5af99f79c815704adf3cde81ea7394ce0fb440"
|
||||
elsif OS.linux?
|
||||
if Hardware::CPU.intel?
|
||||
url "https://github.com/cli/cli/releases/download/v0.11.1/gh_0.11.1_linux_amd64.tar.gz"
|
||||
sha256 "c9d652852841557652a336a064468c31593a3a1f9537ee0f4d2a9c2351166193"
|
||||
end
|
||||
if Hardware::CPU.arm?
|
||||
if Hardware::CPU.is_64_bit?
|
||||
url "https://github.com/cli/cli/releases/download/v0.11.1/gh_0.11.1_linux_arm64.tar.gz"
|
||||
sha256 "b8692b1ff617d33f1af3042c2763175451e9ea506725f7329e999c288946558b"
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/cli/cli.git", :branch => "trunk"
|
||||
depends_on "go"
|
||||
end
|
||||
|
||||
def install
|
||||
system "make", "bin/gh", "manpages" if build.head?
|
||||
bin.install "bin/gh"
|
||||
man1.install Dir["./share/man/man1/gh*.1"]
|
||||
(bash_completion/"gh.sh").write `#{bin}/gh completion -s bash`
|
||||
(zsh_completion/"_gh").write `#{bin}/gh completion -s zsh`
|
||||
(fish_completion/"gh.fish").write `#{bin}/gh completion -s fish`
|
||||
end
|
||||
|
||||
test do
|
||||
help_text = shell_output("#{bin}/gh --help")
|
||||
assert_includes help_text, "Usage:"
|
||||
end
|
||||
end
|
|
@ -4,7 +4,7 @@ This is a Homebrew tap repository that provides the `gh` formula for GitHub CLI.
|
|||
### Homebrew
|
||||
To install:
|
||||
```sh
|
||||
brew install github/gh/gh
|
||||
brew install gh
|
||||
```
|
||||
To upgrade:
|
||||
```sh
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"gh": "homebrew/core"
|
||||
}
|
Загрузка…
Ссылка в новой задаче