Support forked-repo Travis build.

This commit is contained in:
Jacob Hoffman-Andrews 2015-06-18 15:46:34 -07:00
parent 4e7818ac7f
commit 079f019533
2 changed files with 10 additions and 6 deletions

View File

@ -6,20 +6,24 @@ go:
services:
- rabbitmq
sudo: required
matrix:
fast_finish: true
# Only build pushes to the master branch (and PRs)
branches:
only:
- master
before_install:
- go get golang.org/x/tools/cmd/vet
- go get golang.org/x/tools/cmd/cover
- go get github.com/golang/lint/golint
- go get github.com/mattn/goveralls
- go get github.com/modocache/gover
# Boulder consists of multiple Go packages, which
# refer to each other by their absolute GitHub path,
# e.g. github.com/letsencrypt/boulder/analysis. That means, by default, if
# someone forks the repo, Travis won't pass on their own repo. To fix that,
# we add a symlink.
- mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/letsencrypt
- test ! -d $GOPATH/src/github.com/letsencrypt/boulder && ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/letsencrypt/boulder
script:
- make -j4 # Travis has 2 cores per build instance

View File

@ -15,7 +15,7 @@ OBJECTS = activity-monitor \
ocsp-responder
# Build environment variables (referencing core/util.go)
BUILD_ID = $(shell git symbolic-ref --short HEAD) +$(shell git rev-parse --short HEAD)
BUILD_ID = $(shell git symbolic-ref --short HEAD 2>/dev/null) +$(shell git rev-parse --short HEAD)
BUILD_ID_VAR = github.com/letsencrypt/boulder/core.BuildID
BUILD_HOST = $(shell whoami)@$(shell hostname)