2015-01-16 12:17:09 +00:00
|
|
|
class StashCli < Formula
|
2015-06-20 07:36:04 +00:00
|
|
|
desc "Command-line interface clients for Atlassian products"
|
|
|
|
homepage "https://bobswift.atlassian.net/wiki/pages/viewpage.action?pageId=1966101"
|
|
|
|
url "https://bobswift.atlassian.net/wiki/download/attachments/16285777/atlassian-cli-4.3.0-distribution.zip"
|
|
|
|
version "4.3.0"
|
|
|
|
sha256 "b0487ad7795d1970de09d21c17ebea9caf1d7f9c12449c5102a88b0521e2c363"
|
|
|
|
|
|
|
|
depends_on :java => "1.7+"
|
2015-01-16 12:17:09 +00:00
|
|
|
|
|
|
|
def install
|
2015-06-20 07:36:04 +00:00
|
|
|
Dir.glob("*.sh") do |f|
|
|
|
|
cmd = File.basename(f, ".sh")
|
|
|
|
inreplace cmd + ".sh", "`dirname $0`", share
|
|
|
|
bin.install cmd + ".sh" => cmd
|
|
|
|
end
|
2015-01-16 12:17:09 +00:00
|
|
|
share.install "lib", "license"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-06-20 07:36:04 +00:00
|
|
|
Dir.glob(bin/"*") do |f|
|
|
|
|
cmd = File.basename(f, ".sh")
|
|
|
|
assert shell_output(bin/"#{cmd} --help 2>&1 | head").include?("Usage:") unless cmd == "atlassian"
|
|
|
|
end
|
2015-01-16 12:17:09 +00:00
|
|
|
end
|
|
|
|
end
|