GithubHelp home page GithubHelp logo

noirbizarre / bumpr Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 13.0 347 KB

Bump'R: Bump and release versions

License: GNU Lesser General Public License v3.0

Python 100.00%
bump python release release-automation version

bumpr's People

Contributors

dependabot[bot] avatar eight04 avatar noirbizarre avatar pyup-bot avatar voronind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bumpr's Issues

[PyUP] Initial Update

Hi ๐Ÿ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! ๐Ÿค–

python3 bug byte vs str in check_output

Hello,

I wonder if the result of check_output in the helpers.py file shouldn't be "decode()"d for python 3, i.e.

      output = subprocess.check_output(stderr=subprocess.STDOUT, *args, **kwargs)
      if sys.version_info.major==3:
          return output.decode()
      return output

git tags should be annotated

When bumpr issues "git tag [tagname]" (in vcs.py) it should create an annotated tag (-a or --annotate).

Why?

  • git best practice is for versions to be annotated tags.
  • in some best practice configurations only annotated tags get pushed (see git followTags config).

So bumpr should only create annotated tags.

If backwards compatibility is an issue then at least an option to create annotated tags instead of the current behaviour to create lightweight tags should be added.

Feature request: Update changelog w/ actual changes by scanning git log

It appears that the changelog hook will perform replacements on the version in the given changelog file, but does not add the changes that should be a part of that version. It's possible that I'm doing something wrong and I've hit an edge-case, but I've looked at the python code, and I don't think that's true.

This should be feasible by scanning the git log and retrieving pieces of metadata for each commit (e.g. subject, short hash, author, etc.). Under that version header, this list could then be inserted between the previous and current release.

I think similar functionality has been implemented in other Python libraries, but so far those approaches seem a little heavy-handed. This feature seems like a natural extension to Bumpr, which already updates the changelog.

So far, I've managed to achieve the desired behavior by running a shell script from the commands hook, but this seems less than ideal. Personally, I think this would be a nice out-of-the-box feature.

TypeError: coercing to Unicode: need string or buffer, NoneType found

I get this if I run bumpr and there's no conf file (I'm assuming that's the cause):

Traceback (most recent call last):
  File "/usr/local/bin/bumpr", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/bumpr/__init__.py", line 32, in main
    releaser = Releaser(config)
  File "/usr/local/lib/python2.7/dist-packages/bumpr/releaser.py", line 26, in __init__
    with open(config.file) as f:
TypeError: coercing to Unicode: need string or buffer, NoneType found

New configuration format

Deprecate tool.bumpr.ini_format introduced in #296 for a new tool.bumpr configuration format tied to toml.

Given the legacy bumpr.ini support should be removed (#298) in the same milestone,we are now free to rethink entirely the format ๐ŸŽ‰

Hooks are configurable in their repsective sections llike tool.bumpr.replacements or tool.bumpr.readthedocs.

Handle branch & merge

A common use case is to bump some changes on URLs on merge and ensure version is a particular one after the merge.

Given the way bumpr works, it should be really easy to make it handle merge.

Integrate with Twine for increased PyPI account security

Why it would benefit Bumpr:

The biggest reason to use twine is that python setup.py upload uploads files over plaintext. This means anytime you use it you expose your username and password to a MITM attack. Twine uses only verified TLS to upload to PyPI protecting your credentials from theft.

Secondly it allows you to precreate your distribution files. python setup.py upload only allows you to upload something that you've created in the same command invocation. This means that you cannot test the exact file you're going to upload to PyPI to ensure that it works before uploading it.

Finally it allows you to pre-sign your files and pass the .asc files into the command line invocation (twine upload twine-1.0.1.tar.gz twine-1.0.1.tar.gz.asc). This enables you to be assured that you're typing your gpg passphrase into gpg itself and not anything else since you will be the one directly executing gpg --detach-sign -a <filename>.

Link:

https://pypi.python.org/pypi/twine/

New API

Rewrite the CLI API with forward compatibility in mind meaning:

  • no more root command (but verb approach like bump, branch, merge, check...)
  • configuration first (do not try to replicate each and every parameter as cli parameter)

If possible, keep the legacy API for 2 releases but warn and inform about the deprecation and removal timeline.

Store config in `pyproject.toml`

Store configuration in pyproject.toml file.
Configuration format should be the same and stored into the tool.bumpr.ini_options section (we use the same pattern as pytest to transition to pyproject.toml)

Superseedes #10

Prepare version issue

If we use prepare version we got:

-> Bump version 0.2.20
-> Prepare version 0.2.20.dev

I'd like to have other. Bumped patch part and suffix after minus.

-> Bump version 0.2.20
-> Prepare version 0.2.21-dev

Can I do that?

why bumpr does no "push" to repo ?

I would have expected bumpr to do a push after the "bump" and before the "prepare" phase (as part of the publish phase ?). But no push happens. So at the first push after a bumpr, both the "bump" and the "prepare" phase of the version are pushed immediately.
Would it make sense to have a push in between ?

There is no branch logic neither (like master and devel) in bumpr. Are there plans to support more advanced workflows (like doing a bumpr in the devel branch that does the merge/push/etc in the master) ?

Switch from argparse to click

Switch from raw argparse to Click which handle:

  • proper color support
  • proper testing support
  • known edge cases

Bumpr signatures should be backward compatible.

Option to skip prepare phase?

If there is no changes in prepare phase, I get "nothing to commit" message and bumpr fail.

Can we have an option to skip prepare phase? or auto detect whether there is [prepare] section in bumpr.rc.

hook to execute command(s) after bumpr

I would really like, and I expect other users of bumpr too, a hook to execute any command(s) we like after running bumpr.

Examples:

  • git push
  • git push --tags
  • email mailing list.
  • whatever...

These hooks should be "after" the version bump.

I tried the "commands" feature of bumpr and it did not work (executed probably before the bump and not after)

Prepare version bug

If we use -dev as prepare version suffix we got endless raising suffix.
We got after few bumps:

version='0.2.20.-dev.-dev.-dev'

Use YAML instead of ini

ini file is limited:

  • it's not possible to handle list of objects (required for replacements)
  • Python 2/3 implementation slightly differs (mostly when using setup.cfg)

On the opposite, yaml is typed, supported by all Python version with PyYaml, well known and support structured data.

So instead of using a bumpr.rc file or setup.cfg, bumpr will be using a bumpr.yml file.

Handle any replacement

Improve string replacement handling by providing an universal replacement hooks.
ReadtheDocs hooks should extends this one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.