consul-backinator 1.2 (new formula)
New fomrula consul-backinator Adding consul-backinator a Consul (consul.io) backup and restoration utility. Closes #5620. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
a102461579
commit
42b721a2b1
1 changed files with 31 additions and 0 deletions
31
Formula/consul-backinator.rb
Normal file
31
Formula/consul-backinator.rb
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
class ConsulBackinator < Formula
|
||||||
|
desc "Consul backup and restoration application"
|
||||||
|
homepage "https://github.com/myENA/consul-backinator"
|
||||||
|
url "https://github.com/myENA/consul-backinator/archive/v1.2.tar.gz"
|
||||||
|
sha256 "f3fa711053d91c06b2a20393a62192e03642f72e9b31c9ce16953ce76f3c4a54"
|
||||||
|
head "https://github.com/myENA/consul-backinator.git"
|
||||||
|
|
||||||
|
depends_on "go" => :build
|
||||||
|
depends_on "glide" => :build
|
||||||
|
|
||||||
|
def install
|
||||||
|
ENV["GOPATH"] = buildpath
|
||||||
|
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
|
||||||
|
|
||||||
|
dir = buildpath/"src/github.com/myENA/consul-backinator"
|
||||||
|
dir.install buildpath.children
|
||||||
|
|
||||||
|
cd dir do
|
||||||
|
system "glide", "install", "-v"
|
||||||
|
system "go", "build", "-v", "-ldflags",
|
||||||
|
"-X main.appVersion=#{version}", "-o",
|
||||||
|
bin/"consul-backinator"
|
||||||
|
prefix.install_metafiles
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
output = shell_output("#{bin}/consul-backinator --version 2>&1", 1)
|
||||||
|
assert_equal version.to_s, output.strip
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue