From e96d2b5c2885dedb0694304d63cb23c405a6ed51 Mon Sep 17 00:00:00 2001 From: Dave Cottlehuber Date: Tue, 13 May 2014 13:25:52 +0200 Subject: hugo 0.11 --- Library/Formula/hugo.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Library/Formula/hugo.rb (limited to 'Library/Formula') diff --git a/Library/Formula/hugo.rb b/Library/Formula/hugo.rb new file mode 100644 index 000000000..a25ce2f5d --- /dev/null +++ b/Library/Formula/hugo.rb @@ -0,0 +1,28 @@ +require "formula" + +class Hugo < Formula + homepage "http://hugo.spf13.com/" + head "https://github.com/spf13/hugo.git" + url "https://github.com/spf13/hugo.git", :tag => "v0.11" + sha1 "eb036b11d915bf78d0d679ee14ec065458977e2e" + + depends_on "go" => :build + depends_on "bazaar" => :build + depends_on :hg => :build + + def install + ENV["GIT_DIR"] = cached_download/".git" if build.head? + ENV["GOBIN"] = bin + ENV["GOPATH"] = buildpath + ENV["GOHOME"] = buildpath + system "go", "get" + system "go", "build", "main.go" + bin.install "main" => "hugo" + end + + test do + site = testpath/"hops-yeast-malt-water" + system "#{bin}/hugo", "new", "site", site + assert File.exist?("#{site}/config.toml") + end +end -- cgit v1.2.3