diff --git a/HomebrewFormula/gorush.rb b/HomebrewFormula/gorush.rb new file mode 100644 index 0000000..5c67996 --- /dev/null +++ b/HomebrewFormula/gorush.rb @@ -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 diff --git a/README.md b/README.md index 8f1d222..418147b 100644 --- a/README.md +++ b/README.md @@ -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 ``` +On macOS, use Homebrew. + +``` +$ brew install --HEAD https://github.com/appleboy/gorush/raw/master/HomebrewFormula/gorush.rb +``` + ### Command Usage ```