Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis: Only gox build on tags and go1.7 #288

Merged
merged 5 commits into from
Oct 11, 2016

Conversation

emilva
Copy link

@emilva emilva commented Oct 6, 2016

Issue #285

Not sure if this fix will work or not, as I could not get it building on my forked repo in travis-ci.
Anyways, something like this should do the trick

Emil Vaagland added 3 commits October 7, 2016 00:12
@aeneasr
Copy link
Member

aeneasr commented Oct 7, 2016

I think there's still an issue with the travis file:

/home/travis/build.sh: eval: line 46: syntax error: unexpected end of file

https://travis-ci.org/ory-am/hydra/jobs/165746289#L882

@aeneasr
Copy link
Member

aeneasr commented Oct 7, 2016

It looks like travis executes this as a one-liner which probably causes the issues.

@emilva
Copy link
Author

emilva commented Oct 7, 2016

Yeah, will look into that

On 7 October 2016 at 10:54, Aeneas [email protected] wrote:

I think there's still an issue with the travis file:

/home/travis/build.sh: eval: line 46: syntax error: unexpected end of file

https://travis-ci.org/ory-am/hydra/jobs/165746289#L882


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#288 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAZwplOZz1C3OVhatkFdnNPEbIyzmvLfks5qxgi6gaJpZM4KQf99
.

Best regards

Emil Vaagland

Software Engineer

Schibsted Products & Technology Oslo http://www.schibsted.com

Mob +4792668890

Signed-off-by: Emil Vaagland <[email protected]>
@aeneasr
Copy link
Member

aeneasr commented Oct 7, 2016

Looks like the issue persists: https://travis-ci.org/ory-am/hydra/jobs/165755242#L883

Are you sure that you can use raw bash in the travis config? Maybe you need to create a little bash script and call it from travis.yml instead.

@boyvinall
Copy link
Contributor

boyvinall commented Oct 7, 2016

you can probably use bash as long as it's inside the yaml array. Something like:

after_success:
- [ "${TRAVIS_TAG}" != "" ] && [ "${TRAVIS_GO_VERSION}" == "1.7" ] && gox -ldflags "-X github.com/ory-am/hydra/cmd.Version=`git describe --tags` -X github.com/ory-am/hydra/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory-am/hydra/cmd.GitHash=`git rev-parse HEAD`" -output "dist/ {.Dir}}-{{.OS}}-{{.Arch}}"

except ... you need to ensure the leading [ isn't seen as a yaml token, so maybe some sort of heredoc:

after_success:
- |-
  [ "${TRAVIS_TAG}" != "" ] && [ "${TRAVIS_GO_VERSION}" == "1.7" ] && gox -ldflags "-X github.com/ory-am/hydra/cmd.Version=`git describe --tags` -X github.com/ory-am/hydra/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory-am/hydra/cmd.GitHash=`git rev-parse HEAD`" -output "dist/ {.Dir}}-{{.OS}}-{{.Arch}}"

@aeneasr
Copy link
Member

aeneasr commented Oct 11, 2016

Cool, it doesn't throw any errors any more. Not sure if it really works though, yet :D Thanks for the hard work so far. I'll merge it and see what happens!

@aeneasr aeneasr merged commit f5299a1 into ory:master Oct 11, 2016
@emilva
Copy link
Author

emilva commented Oct 11, 2016

yeah, should be ok now! Tested the bash syntax in another project, and it worked as expected.

@aeneasr
Copy link
Member

aeneasr commented Oct 11, 2016

awesome, thanks so much :)

emilva pushed a commit to emilva/hydra that referenced this pull request Oct 15, 2016
@emilva emilva deleted the only_gox_build_on_tags branch October 17, 2016 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants