Permalink
Browse files

doctl 1.0.0

Closes Homebrew/legacy-homebrew#50439.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
  • Loading branch information...
phillbaker authored and xu-cheng committed Mar 26, 2016
1 parent b11296f commit 6a091d486cf3021860739dabdd83e50c3b9e75ed
Showing with 5 additions and 18 deletions.
  1. +5 −18 Formula/doctl.rb
View
@@ -3,8 +3,8 @@
class Doctl < Formula
desc "Command-line tool for DigitalOcean"
homepage "https://github.com/digitalocean/doctl"
url "https://github.com/digitalocean/doctl/archive/0.0.16.tar.gz"
sha256 "4f4805f36fd0d437331c25a183471419d10a680721f7f5a890b4109319d605ed"
url "https://github.com/digitalocean/doctl/archive/v1.0.0.tar.gz"
sha256 "62a5b539d07be25dae41a71f0b0d119e345eb3224a38f76bbef92aaa17ef0e66"
head "https://github.com/digitalocean/doctl.git"
bottle do
@@ -16,28 +16,15 @@ class Doctl < Formula
end
depends_on "go" => :build
depends_on "godep" => :build
go_resource "github.com/kr/fs" do
url "https://github.com/kr/fs.git", :revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
end
go_resource "golang.org/x/tools" do
url "https://github.com/golang/tools.git", :revision => "473fd854f8276c0b22f17fb458aa8f1a0e2cf5f5"
end
go_resource "golang.org/x/crypto" do
url "https://github.com/golang/crypto.git", :revision => "8b27f58b78dbd60e9a26b60b0d908ea642974b6d"
end
def install
ENV["GOPATH"] = buildpath/"src/github.com/digitalocean/doctl/Godeps/_workspace"
ENV["GOPATH"] = buildpath
mkdir_p buildpath/"src/github.com/digitalocean/"
ln_sf buildpath, buildpath/"src/github.com/digitalocean/doctl"
Language::Go.stage_deps resources, buildpath/"src"
system "godep", "restore"
system "godep", "go", "build", "-o", "doctl", "."
system "go", "build", "-ldflags", "-X github.com/digitalocean/doctl/Build=#{version}", "github.com/digitalocean/doctl/cmd/doctl"
bin.install "doctl"
end

0 comments on commit 6a091d4

Please sign in to comment.