use upstream vendor directory

Closes #7587.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-12-06 04:39:23 -08:00
parent 074b3e648a
commit 4ff8f7bae0

View file

@ -1,10 +1,8 @@
require "language/go"
class Td < Formula
desc "Your todo list in your terminal"
homepage "https://github.com/Swatto/td"
url "https://github.com/Swatto/td/archive/1.3.0.tar.gz"
sha256 "d138fd1798cf828fe6291cf3faf447ce9abbfa29ae5ff5ede977b7cb5dfc8db0"
url "https://github.com/Swatto/td/archive/1.4.0.tar.gz"
sha256 "b8080a73b274c201bc1fadaf5b83e5fab26b38838f4c82b49f1ae5dadaa94c20"
bottle do
cellar :any_skip_relocation
@ -17,32 +15,18 @@ class Td < Formula
depends_on "go" => :build
go_resource "github.com/codegangsta/cli" do
url "https://github.com/codegangsta/cli.git",
:revision => "bca61c476e3c752594983e4c9bcd5f62fb09f157"
end
go_resource "github.com/daviddengcn/go-colortext" do
url "https://github.com/daviddengcn/go-colortext.git",
:revision => "3b18c8575a432453d41fdafb340099fff5bba2f7"
end
def install
ENV["GOBIN"] = bin
ENV["GOPATH"] = buildpath
ENV["GOHOME"] = buildpath
mkdir_p buildpath/"src/github.com/Swatto/"
ln_sf buildpath, buildpath/"src/github.com/Swatto/td"
Language::Go.stage_deps resources, buildpath/"src"
system "go", "build", "."
bin.install "td-#{version}" => "td"
ENV["GOBIN"] = bin
(buildpath/"src/github.com/Swatto/td").install buildpath.children
cd "src/github.com/Swatto/td" do
system "go", "install"
prefix.install_metafiles
end
end
test do
(testpath/".todos").write "[]"
(testpath/".todos").write "[]\n"
system "#{bin}/td", "a", "todo of test"
todos = (testpath/".todos").read
assert_match "todo of test", todos