-
Notifications
You must be signed in to change notification settings - Fork 0
/
ahoy.rb
29 lines (25 loc) · 908 Bytes
/
ahoy.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require "language/go"
class Ahoy < Formula
desc "Ahoy - Create aliases for commands on docker, ssh, and your local machine."
homepage "https://github.com/devinci-code/ahoy"
url "https://github.com/DevinciHQ/ahoy/releases/download/1.1.0/ahoy-darwin-amd64"
version "1.1.0"
sha256 "8bb1c76e28ca499f2dcadafdec7776ca3bd4e85c45c8d4f9f19220d5d4f233cf"
head "https://github.com/DevinciHQ/ahoy.git",
:branch => "master"
depends_on "go" => :build
def install
# Build from the latest verison of ahoy.
if build.head?
ENV["GOPATH"] = buildpath
project = "github.com/DevinciHQ/ahoy"
path = buildpath/"src/github.com/DevinciHQ/ahoy"
path.install Dir["*"]
Language::Go.stage_deps resources, buildpath/"src"
system "bash", "src/" +project+"/build.sh", project
else
system "mv", "ahoy-darwin-amd64", "ahoy"
end
bin.install "ahoy"
end
end