dashboard/buildlet: darwin support

Update golang/go#9495

Change-Id: I732cfdee952ad3bf0b3411d0ce45723900acedb4
Reviewed-on: https://go-review.googlesource.com/2472
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Brad Fitzpatrick 2015-01-07 14:08:28 -08:00
parent bd69d2dd34
commit 47646d42a2
2 changed files with 10 additions and 0 deletions

View File

@ -12,3 +12,7 @@ buildlet.plan9-386: buildlet.go
buildlet.windows-amd64: buildlet.go
GOOS=windows GOARCH=amd64 go build -o $@ --tags=buildlet
cat $@ | (cd ../coordinator/buildongce && go run create.go --write_object=go-builder-data/$@)
buildlet.darwin-amd64: buildlet.go
GOOS=darwin GOARCH=amd64 go build -o $@ --tags=buildlet
cat $@ | (cd ../coordinator/buildongce && go run create.go --write_object=go-builder-data/$@)

View File

@ -48,6 +48,12 @@ var (
)
func defaultListenAddr() string {
if runtime.GOOS == "darwin" {
// Darwin will never run on GCE, so let's always
// listen on a high port (so we don't need to be
// root).
return ":5936"
}
if metadata.OnGCE() {
// In production, default to
return ":80"