github-markdown-toc 1.0.0

Closes #34163.

Signed-off-by: Igor Kapkov <igasgeek@me.com>
This commit is contained in:
Igor Kapkov 2018-11-16 20:19:04 +11:00
parent 153fea8fb0
commit e9b28c8117
No known key found for this signature in database
GPG key ID: D7EEA6CEB7ECBDC7

View file

@ -1,8 +1,8 @@
class GithubMarkdownToc < Formula
desc "Easy TOC creation for GitHub README.md (in go)"
homepage "https://github.com/ekalinin/github-markdown-toc.go"
url "https://github.com/ekalinin/github-markdown-toc.go/archive/0.8.0.tar.gz"
sha256 "210e998e15b6b34c741a7e1500cf0e98494fe6d019c1fb85305d52e8070f3365"
url "https://github.com/ekalinin/github-markdown-toc.go/archive/1.0.0.tar.gz"
sha256 "0a13627a29114ee817160ecd3eba130c05f95c4aeedb9d0805d8b5a587fce55a"
bottle do
cellar :any_skip_relocation
@ -17,16 +17,18 @@ class GithubMarkdownToc < Formula
def install
ENV["GOPATH"] = buildpath
ENV["GO111MODULE"] = "on"
dir = buildpath/"src/github.com/ekalinin/github-markdown-toc.go"
dir.install buildpath.children
cd dir do
system "go", "build", "-o", bin/"gh-md-toc", "main.go"
system "go", "build", "-o", bin/"gh-md-toc"
prefix.install_metafiles
end
end
test do
(testpath/"README.md").write("# Header")
system bin/"gh-md-toc", "--version"
system bin/"gh-md-toc", "../README.md"
assert_match "* [Header](#header)", shell_output("#{bin}/gh-md-toc ./README.md")
end
end