Skip to content

Initial homebrew support (fix #9) #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
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.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