这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

gh formula fixes #3

Merged
merged 1 commit into from
Nov 8, 2019
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
21 changes: 18 additions & 3 deletions Formula/gh.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
class Gh < Formula
desc "GitHub CLI"
url "https://github.com/github/homebrew-gh/releases/download/v0.0.195/gh-cli_0.0.195_darwin_amd64.tar.gz"
sha256 "82f8c50415d14851d3fb1a800ffd047f181880deb5450acd67bc7594fa2a19ea"
homepage "https://github.com/github/gh-cli"
version "0.0.195"

if OS.mac?
url "https://github.com/github/homebrew-gh/releases/download/v0.0.195/gh-cli_0.0.195_darwin_amd64.tar.gz"
sha256 "82f8c50415d14851d3fb1a800ffd047f181880deb5450acd67bc7594fa2a19ea"
elsif OS.linux?
# TODO
end

head do
url "https://github.com/github/gh-cli.git", :branch => "prototype"
depends_on "go"
end

bottle :unneeded

def install
bin.install "gh"
system "make" if build.head?
bin.install File.exist?("bin/gh") ? "bin/gh" : "gh"
(bash_completion/"gh.sh").write `#{bin}/gh completion -s bash`
(zsh_completion/"_gh").write `#{bin}/gh completion -s zsh`
end

test do
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Homebrew tap for GitHub CLI

First-time:
Installation:

```sh
brew install github/homebrew-gh/gh
brew install github/gh/gh
```

That's it. You are now ready to use `gh`. 🥳
Expand All @@ -21,10 +21,19 @@ Available Commands:
pr Work with pull requests
```

To stay up to date with `gh` development:
Thank you for trying out GitHub CLI! 🌟

```sh
brew upgrade gh
### Development version (restricted access)

You can get access to features that are not yet in the stable release by
building the development version:

```
brew install github/gh/gh --HEAD
```

Thank you for testing GitHub CLI! 🌟
To upgrade it:

```
brew upgrade gh --fetch-HEAD
```