From a6b7b31adea36a633a687709bf3930ed4f448858 Mon Sep 17 00:00:00 2001 From: Jainish Shah Date: Thu, 10 Dec 2015 15:34:07 -0800 Subject: [PATCH] artifactory-cli-go 1.2.0 (new formula) Command line interface for Artifactory Closes Homebrew/homebrew#46891. Signed-off-by: Dominyk Tiller --- Formula/artifactory-cli-go.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Formula/artifactory-cli-go.rb diff --git a/Formula/artifactory-cli-go.rb b/Formula/artifactory-cli-go.rb new file mode 100644 index 0000000000..856e5d1657 --- /dev/null +++ b/Formula/artifactory-cli-go.rb @@ -0,0 +1,21 @@ +class ArtifactoryCliGo < Formula + desc "Provides a command-line interface for Artifactory." + homepage "https://github.com/JFrogDev/artifactory-cli-go" + url "https://github.com/JFrogDev/artifactory-cli-go/archive/1.2.0.tar.gz" + sha256 "173a24e0b821c6ff2bb85fa4cbe733fa681a8284029b77387baf0fa5f2fcfc4e" + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO15VENDOREXPERIMENT"] = "1" + (buildpath/"src/github.com/JFrogDev/artifactory-cli-go/").install Dir["*"] + system "go", "build", "-o", "#{bin}/art", "-v", "github.com/JFrogDev/artifactory-cli-go/art/" + end + + test do + actual = pipe_output("#{bin}/art upload") + expected = "The --url option is mandatory\n" + assert_equal expected, actual + end +end