Skip to content

Instantly share code, notes, and snippets.

@moul
Created May 24, 2016 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moul/714610e8b55f902350c9c3256171e0f7 to your computer and use it in GitHub Desktop.
Save moul/714610e8b55f902350c9c3256171e0f7 to your computer and use it in GitHub Desktop.
temporary docker-machine-driver-scaleway.rb without "depends_on docker-machine"
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.2.1.tar.gz"
sha256 "dcfb35c4dd0a5ae7836d7275598a5de6b123b8f983ae3faaba42c51c28212ec6"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment