From b43d5ce9cb38cd2a4bc38102fb7235c72723b127 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 19 Apr 2016 12:05:26 +0200 Subject: [PATCH] Initial homebrew support (fix #9) --- .../docker-machine-driver-scaleway.rb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 contrib/homebrew/docker-machine-driver-scaleway.rb diff --git a/contrib/homebrew/docker-machine-driver-scaleway.rb b/contrib/homebrew/docker-machine-driver-scaleway.rb new file mode 100644 index 00000000..8847e275 --- /dev/null +++ b/contrib/homebrew/docker-machine-driver-scaleway.rb @@ -0,0 +1,29 @@ +require "language/go" + +class DockerMachineDriverScaleway < Formula + desc "Docker Machine driver for Scaleway" + homepage "https://github.com/scaleway/docker-machine-driver-scaleway/" + url "https://github.com/scaleway/docker-machine-driver-scaleway/archive/v1.0.0.tar.gz" + sha256 "ca8b2551a2cbf871cb9111ae6a991b5a4a207b4330033ca495f75642729c4c1d" + + head "https://github.com/scaleway/docker-machine-driver-scaleway.git" + + depends_on "go" => :build + depends_on "docker-machine" => :recommended + + def install + ENV["GOPATH"] = buildpath + #ENV["GOBIN"] = buildpath + path = buildpath/"src/github.com/scaleway/docker-machine-driver-scaleway" + path.install Dir["{*,.git,.gitignore}"] + + cd path do + system "go", "build", "-o", "#{bin}/docker-machine-driver-scaleway", "./main.go" + end + end + + test do + output = shell_output("#{Formula["docker-machine"].bin}/docker-machine create --driver scaleway -h") + assert_match "scaleway-name", output + end +end