feat: support install from homebrew (#360)

* feat: support install from homebrew

* docs: add readme.
This commit is contained in:
Bo-Yi Wu 2018-06-27 09:28:27 +08:00 committed by GitHub
parent bcf18d662a
commit 5d5127b690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

17
HomebrewFormula/gorush.rb Normal file
View File

@ -0,0 +1,17 @@
class Gorush < Formula
desc "A push notification server written in Go (Golang)."
homepage "https://github.com/appleboy/gorush"
head "https://github.com/appleboy/gorush.git"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
gorushpath = buildpath/"src/github.com/appleboy/gorush"
gorushpath.install buildpath.children
cd gorushpath do
system "go", "build", "-o", bin/"gorush"
prefix.install_metafiles
end
end
end

View File

@ -194,6 +194,12 @@ On Windows
$ wget https://github.com/appleboy/gorush/releases/download/1.10.0/gorush-1.10.0-windows-amd64.exe -O gorush.exe $ wget https://github.com/appleboy/gorush/releases/download/1.10.0/gorush-1.10.0-windows-amd64.exe -O gorush.exe
``` ```
On macOS, use Homebrew.
```
$ brew install --HEAD https://github.com/appleboy/gorush/raw/master/HomebrewFormula/gorush.rb
```
### Command Usage ### Command Usage
``` ```