prydonius / karn

Manage multiple Git identities
MIT License
304 stars 7 forks source link

travis: Make the build script independent of the fork #7

Closed sschuberth closed 9 years ago

sschuberth commented 9 years ago

This way forks do not have to adjust the .travis.yml file to make CI work. Deploying releases from forks would still require changing the OAuth token, though.

prydonius commented 9 years ago

This is great, although I guess it relies on forks having their changes in master. If travis pulls the changes after a commit, couldn't we use that instead of getting it from github? Do you think something like: gox -os="darwin linux windows" -arch="386 amd64" ./cmd/karn would work?

sschuberth commented 9 years ago

I guess it relies on forks having their changes in master.

Actually, it does not. There's nothing branch-specific in this change, it's just about not hard-coding the GitHub user name ($TRAVIS_REPO_SLUG does not contain the branch name but only the user name / repo combo).

However, I found your proposal of using a relative build path to also work, which is even nicer. I'll update my PR.

prydonius commented 9 years ago

Ah I just took a deeper look at the log from travis and it checks out the branch with the changes into the GOPATH so you're right that the previous solution works too.

In any case, I agree that using the relative path is nicer, thanks a lot for the update @sschuberth!