go 1.2rc2 (devel)
Update documentation and don't check with go vet. That is now in go.tools starting in go 1.2. Make a check that go is working by using `go fmt` and running a smal go program. Closes Homebrew/homebrew#23359. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
5a06caf225
commit
f5fd91880d
1 changed files with 21 additions and 7 deletions
|
@ -18,9 +18,9 @@ class Go < Formula
|
|||
option 'without-cgo', "Build without cgo"
|
||||
|
||||
devel do
|
||||
url 'https://go.googlecode.com/files/go1.2rc1.src.tar.gz'
|
||||
version '1.2rc1'
|
||||
sha1 '9f39106e06f552e9bf6d15d201c4663c051d4f89'
|
||||
url 'https://go.googlecode.com/files/go1.2rc2.src.tar.gz'
|
||||
version '1.2rc2'
|
||||
sha1 '1fc3b39431551ffa69035ccffea18f4328dc2e8c'
|
||||
end
|
||||
|
||||
if build.with? 'cgo' and not build.devel?
|
||||
|
@ -87,7 +87,8 @@ class Go < Formula
|
|||
bin.install_symlink Dir["#{libexec}/bin/*"]
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
def caveats
|
||||
changelog = <<-EOS.undent
|
||||
The go get command no longer allows $GOROOT as
|
||||
the default destination in Go 1.1 when downloading package source.
|
||||
To use the go get command, a valid $GOPATH is now required.
|
||||
|
@ -97,6 +98,19 @@ class Go < Formula
|
|||
|
||||
More information here: http://golang.org/doc/code.html#GOPATH
|
||||
EOS
|
||||
|
||||
if build.devel?
|
||||
changelog += <<-EOS.undent
|
||||
|
||||
In go 1.2 go vet and go doc are now part of the go.tools sub repo.
|
||||
see: http://tip.golang.org/doc/go1.2#go_tools_godoc
|
||||
|
||||
To get go vet and go doc run:
|
||||
$ go get code.google.com/p/go.tools/cmd/godoc
|
||||
$ go get code.google.com/p/go.tools/cmd/vet
|
||||
EOS
|
||||
end
|
||||
return changelog
|
||||
end
|
||||
|
||||
test do
|
||||
|
@ -109,9 +123,9 @@ class Go < Formula
|
|||
fmt.Println("Hello World")
|
||||
}
|
||||
EOS
|
||||
# Run go vet check for no errors then run the program.
|
||||
# This is a a bare minimum of go working as it uses vet, build, and run.
|
||||
system "#{bin}/go", "vet", "hello.go"
|
||||
# Run go fmt check for no errors then run the program.
|
||||
# This is a a bare minimum of go working as it uses fmt, build, and run.
|
||||
system "#{bin}/go", "fmt", "hello.go"
|
||||
assert_equal "Hello World\n", `#{bin}/go run hello.go`
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue