{"action":"created","issue":{"url":"https://api.github.com/repos/peritus/bumpversion/issues/77","labels_url":"https://api.github.com/repos/peritus/bumpversion/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/peritus/bumpversion/issues/77/comments","events_url":"https://api.github.com/repos/peritus/bumpversion/issues/77/events","html_url":"https://github.com/peritus/bumpversion/issues/77","id":58932469,"number":77,"title":"Add an easy way to maintain PEP 440 compatible version identifiers","user":{"login":"keimlink","id":46511,"avatar_url":"https://avatars.githubusercontent.com/u/46511?v=3","gravatar_id":"","url":"https://api.github.com/users/keimlink","html_url":"https://github.com/keimlink","followers_url":"https://api.github.com/users/keimlink/followers","following_url":"https://api.github.com/users/keimlink/following{/other_user}","gists_url":"https://api.github.com/users/keimlink/gists{/gist_id}","starred_url":"https://api.github.com/users/keimlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keimlink/subscriptions","organizations_url":"https://api.github.com/users/keimlink/orgs","repos_url":"https://api.github.com/users/keimlink/repos","events_url":"https://api.github.com/users/keimlink/events{/privacy}","received_events_url":"https://api.github.com/users/keimlink/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-25T16:55:17Z","updated_at":"2015-03-11T11:24:10Z","closed_at":null,"body":"[PEP 440](https://www.python.org/dev/peps/pep-0440/) defines a new scheme for identifying versions of Python software distributions. bumpversion should offer an easy way to maintain all kinds of [version identifiers supported by PEP 440](https://www.python.org/dev/peps/pep-0440/#version-scheme).\r\n\r\n## Example\r\n\r\nIf I want to use \"dev\" releases to allow my users to download development releases from PyPI I have to use the following bumpversion configuration:\r\n\r\n    [bumpversion]\r\n    files = setup.py docs/conf.py\r\n    commit = True\r\n    current_version = 0.2.0.dev0\r\n    parse = \r\n        (?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:\\.dev(?P<dev>\\d+))?\r\n    serialize = \r\n        {major}.{minor}.{patch}.dev{dev}\r\n        {major}.{minor}.{patch}\r\n\r\n    [bumpversion:part:dev]\r\n    values = \r\n        0\r\n        1\r\n        2\r\n        3\r\n        4\r\n    optional_value = 4\r\n\r\nAfter releasing `0.1.2` users can execute `bumpversion minor` and will move the version to `0.2.0.dev0` which is fine.\r\n\r\nBut to have no \"dev\" release at all or to stop doing \"dev\" releases `optional_value` has to be set manually to the value of the release to be skipped. So I would appreciate it if users could use an option to move from 0.2.0.dev0 to 0.2.0.\r\n\r\nCurrently I have no idea how options for this behaviour could look like."},"comment":{"url":"https://api.github.com/repos/peritus/bumpversion/issues/comments/78245893","html_url":"https://github.com/peritus/bumpversion/issues/77#issuecomment-78245893","issue_url":"https://api.github.com/repos/peritus/bumpversion/issues/77","id":78245893,"user":{"login":"tuukkamustonen","id":94327,"avatar_url":"https://avatars.githubusercontent.com/u/94327?v=3","gravatar_id":"","url":"https://api.github.com/users/tuukkamustonen","html_url":"https://github.com/tuukkamustonen","followers_url":"https://api.github.com/users/tuukkamustonen/followers","following_url":"https://api.github.com/users/tuukkamustonen/following{/other_user}","gists_url":"https://api.github.com/users/tuukkamustonen/gists{/gist_id}","starred_url":"https://api.github.com/users/tuukkamustonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuukkamustonen/subscriptions","organizations_url":"https://api.github.com/users/tuukkamustonen/orgs","repos_url":"https://api.github.com/users/tuukkamustonen/repos","events_url":"https://api.github.com/users/tuukkamustonen/events{/privacy}","received_events_url":"https://api.github.com/users/tuukkamustonen/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T11:24:10Z","updated_at":"2015-03-11T11:24:10Z","body":"Sorry, I haven't used bumpversion, just found it and I'm reading docs so I might have missed something...\r\n\r\nTo me, it seems like bumpversion relies on information committed to SCM in files (`.bumpversion.cfg`, `setup.py`). So, when I make a commit and want to build a pre-release, the build number (how many commits since the last release) is not obtained from `git describe` and I would need to set it in files (change it for each commit). But maybe bumpversion already does this somehow?\r\n\r\nI'm also looking at https://pypi.python.org/pypi/setuptools-version-command. The idea there is that version identifier is interpreted solely from `git describe`. Does bumpversion allow the same?"}}