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

Cannot use environment variable to set deploy.prerelease in .travis.yml #613

Closed
Librazy opened this Issue Apr 15, 2017 · 9 comments

Comments

Projects
None yet
5 participants
@Librazy

Librazy commented Apr 15, 2017

I tried to automate my github prerelease/release deploy. I wish I could ship a release when my commit message start with some magic chars. So I wrote some bash script in before_deploy to set up a environment variable GHTHUB_DEPLOY_PRERELEASE, and set deploy.prerelease to

  prerelease: $GHTHUB_DEPLOY_PRERELEASE

everything works fine when preparing deploy.
But it says

For 'properties/prerelease', "false" is not a boolean. // See: https://developer.github.com/v3

when deploying application.

full log:
https://travis-ci.org/Librazy/TooltipFilter/builds/222308618

.travis.yml:
https://github.com/Librazy/TooltipFilter/blob/d767b946acd87a701e886c9d282032558e001917/.travis.yml

……Seems that environment variables are always strings?

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Apr 15, 2017

Member

Boolean values need to be handled in Releases options.

Member

BanzaiMan commented Apr 15, 2017

Boolean values need to be handled in Releases options.

@Librazy

This comment has been minimized.

Show comment
Hide comment
@Librazy

Librazy Apr 15, 2017

Any workaround now?
Can I call dpl directly then pass --prerelease=$GHTHUB_DEPLOY_PRERELEASE to it?

Librazy commented Apr 15, 2017

Any workaround now?
Can I call dpl directly then pass --prerelease=$GHTHUB_DEPLOY_PRERELEASE to it?

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Apr 15, 2017

Member

Arguments need to be processed by dpl into booleans, so that the GitHub API payload has correct data type (false vs "false").

Member

BanzaiMan commented Apr 15, 2017

Arguments need to be processed by dpl into booleans, so that the GitHub API payload has correct data type (false vs "false").

@tovrstra

This comment has been minimized.

Show comment
Hide comment
@tovrstra

tovrstra Aug 28, 2017

I'm hitting the same issue. Is there a workaround?

tovrstra commented Aug 28, 2017

I'm hitting the same issue. Is there a workaround?

@mjackson

This comment has been minimized.

Show comment
Hide comment
@mjackson

mjackson Feb 1, 2018

One workaround would be to use deploy.on.condition to just skip the whole deploy. You need to duplicate all the other deploy config for each case, but since prerelease is a boolean there will only be 2.

I'm doing it here.

mjackson commented Feb 1, 2018

One workaround would be to use deploy.on.condition to just skip the whole deploy. You need to duplicate all the other deploy config for each case, but since prerelease is a boolean there will only be 2.

I'm doing it here.

@XaF

This comment has been minimized.

Show comment
Hide comment
@XaF

XaF Mar 8, 2018

Following that issue. Same problem here.

XaF commented Mar 8, 2018

Following that issue. Same problem here.

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Mar 19, 2018

Member

Hello there. I've pushed a potential fix for this issue. Please test and report the results. Thank you.

provider: releases
edge:
  branch: releases-booleanize# rest

(If you have multiple deployment providers, please adjust the definition accordingly.)

Member

BanzaiMan commented Mar 19, 2018

Hello there. I've pushed a potential fix for this issue. Please test and report the results. Thank you.

provider: releases
edge:
  branch: releases-booleanize# rest

(If you have multiple deployment providers, please adjust the definition accordingly.)

Librazy added a commit to Librazy/TooltipFilter that referenced this issue Mar 20, 2018

@Librazy

This comment has been minimized.

Show comment
Hide comment
@Librazy

Librazy Mar 20, 2018

It works !

Librazy commented Mar 20, 2018

It works !

@Librazy Librazy closed this Mar 20, 2018

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Mar 20, 2018

Member

1.9.2 is out.

Member

BanzaiMan commented Mar 20, 2018

1.9.2 is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment