gotags 1.3.0 (new formula)
Closes Homebrew/homebrew#40979. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
28ada836c2
commit
4491dfec6f
1 changed files with 29 additions and 0 deletions
29
Formula/gotags.rb
Normal file
29
Formula/gotags.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
class Gotags < Formula
|
||||
desc "ctags-compatible tag generator for Go"
|
||||
homepage "https://github.com/jstemmer/gotags"
|
||||
url "https://github.com/jstemmer/gotags/archive/v1.3.0.tar.gz"
|
||||
sha256 "414e1f96b560b089f11f814cd9000974a8ee376bb2cd9119cce60368e89ba226"
|
||||
|
||||
head "https://github.com/jstemmer/gotags.git"
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
|
||||
system "go", "build", "-o", "gotags"
|
||||
bin.install "gotags"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.go").write <<-EOS.undent
|
||||
package main
|
||||
|
||||
type Foo struct {
|
||||
Bar int
|
||||
}
|
||||
EOS
|
||||
|
||||
assert_match (/^Bar.*test.go.*$/), shell_output("#{bin}/gotags #{testpath}/test.go")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue