Skip to content

Commit

Permalink
Initial homebrew support (fix #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Apr 19, 2016
1 parent 856cc77 commit 4c2c3e3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions contrib/homebrew/docker-machine-driver-scaleway.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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
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

0 comments on commit 4c2c3e3

Please sign in to comment.