diff --git a/README.md b/README.md index 9dc8ee2a..80f344df 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ $> curl --silent http://212.47.248.251 | head -n1 # you can also open your brows ### master (unreleased) -* No entry +* Initial homebrew support ([#9](https://github.com/scaleway/docker-machine-driver-scaleway/issues/9)) View full [commits list](https://github.com/scaleway/docker-machine-driver-scaleway/compare/v1.0.1x...master) diff --git a/contrib/homebrew/docker-machine-driver-scaleway.rb b/contrib/homebrew/docker-machine-driver-scaleway.rb new file mode 100644 index 00000000..b3c8d95d --- /dev/null +++ b/contrib/homebrew/docker-machine-driver-scaleway.rb @@ -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.1.tar.gz" + sha256 "90caba19fa78bd5c6e01c0696ff37eb9d877cb252ae37dacc63ffde86a3cbe7a" + + 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