Skip to content

Commit

Permalink
dashboard/buildlet: darwin support
Browse files Browse the repository at this point in the history
Update golang/go#9495

Change-Id: I732cfdee952ad3bf0b3411d0ce45723900acedb4
Reviewed-on: https://go-review.googlesource.com/2472
Reviewed-by: Andrew Gerrand <[email protected]>
  • Loading branch information
bradfitz committed Jan 8, 2015
1 parent bd69d2d commit 47646d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dashboard/buildlet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/$@)
6 changes: 6 additions & 0 deletions dashboard/buildlet/buildlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 47646d4

Please sign in to comment.