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

allow answering input-question via commandline-options #214

Open
woutervh opened this issue Mar 7, 2017 · 2 comments
Open

allow answering input-question via commandline-options #214

woutervh opened this issue Mar 7, 2017 · 2 comments

Comments

@woutervh
Copy link

woutervh commented Mar 7, 2017

For the moment --no-input is the only real commandline-option

it would be nice to answer any asked question also via commandline-parameter

the use-case I have for this is automated building / deployment

  • no commits to master
  • merge to master -> build the package, make git-tag, upload package

I'm in a Java-team and need to comply to their tools and workflow.

For example: I run prerelease and postrelease on my own develop-branch
when finished I merge to master, and then jenkins or gitlab CI takes over to run quality checks and build the package and upload it to a repository

release

  • question1:
    Tag needed to proceed, you can use the following command:
    git tag 0.8 -m "Tagging 0.8"
    Run this command (Y/n)?

  • question 2:
    Check out the tag (for tweaks or pypi/distutils server upload) (Y/n)?

-question3
Upload to nexus-redtree (Y/n)?

what if I want Y/Y/N or N/N/Y?
goal is to split up in multiple steps.
of one step failed, it should be easy to redo that specific step.

Second use-case, setting version-number via commandline
E.g. an automatic build-number as version

@reinout
Copy link
Collaborator

reinout commented Mar 7, 2017

Not checking out the tag: that is the easy one. Add a setup.cfg file (I'm pretty sure it works even if it is no python package) and add release = no under a [zest.releaser] ini header.

Redoing steps: that is hard. Unless the split in prerelease/release/postrelease is enough. If one of the parts failed, you can run the other parts, after some manual fix, just fine.

We could add more command line options, but I'm naturally inclined not to add them because of the maintenance burden. But perhaps there's a generic way for the yes/no answers that is easy to support.

@mauritsvanrees
Copy link
Member

The downside of command line options, is that this makes it harder to understand why something is or is not happening. Options can then come from:

  • defaults
  • setup.cfg
  • ~/.pypirc
  • command line options

That is a bit much.

We do currently have a hook for dropping in answers, which we use only for testing:
https://github.com/zestsoftware/zest.releaser/blob/master/zest/releaser/utils.py#L307-L341
Maybe that could be integrated. Probably easier done in another option in setup.cfg.

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

No branches or pull requests

3 participants