bradleyfalzon / apicompat

apicompat checks recent changes to a Go project for backwards incompatible changes
https://abicheck.bradleyf.id.au
MIT License
179 stars 5 forks source link

git exec error in Travis CI environment #35

Closed ahmetb closed 7 years ago

ahmetb commented 7 years ago

I run this in my travis-ci script section:

test -z "$(apicompat -before master -after HEAD ./... | tee /dev/stderr)"

it gives error:

apicompat: go/build error: could not execute git [--git-dir /home/travis/gopath/src/github.com/ahmetalpbalkan/go-linq/.git ls-tree master ./], error: exit status 128

Any ideas what this error might be about?

I also tried this:

test -z "$(apicompat -before ${TRAVIS_COMMIT_RANGE%...*} -after ${TRAVIS_COMMIT_RANGE#*...} ./... | tee /dev/stderr)"

it gives the same error. I think the apicompat can do better here by preserving the error output from the executed git command (perhaps by passing it down its own stdout/stderr).

ahmetb commented 7 years ago

just kidding it looks like this already works:

test -z "$(apicompat -before ${TRAVIS_COMMIT_RANGE%...*} -after ${TRAVIS_COMMIT_RANGE#*...} ./... | tee /dev/stderr)"