diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/hugo.rb | 28 |
1 files changed, 28 insertions, 0 deletions
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 |
