support prereleases
See original GitHub issueHere is the workflow I’m following for my project (assuming last release is 3.11) ‘master’ branch is for stable releases, ‘next’ is for development.
On ‘next’:
- First, alpha release: 3.12a1 to start implementing exciting new features
- When all new features are implemented: first release candidate: 3.12rc1
- Fix bugs found during beta-testing: 3.12rc2
- (optional: 3.12rc3, 3.12rc4 … until all blocking bugs are fixed)
- Final release: 3.12 (merge ‘next’ into ‘master’)
On ‘master’;
- Bugs found after 3.12 was released, release 3.12.1
- Optional, 3.12.3, 3.12.4…,
This version scheme is modeled after PEP440
Here’s what I’ve tried:
[bumpversion]
current_version = 3.12a1
files = setup.py cmake/qibuild/version.cmake doc/source/conf.in.py python/qisys/main.py
message = qibuild {new_version}
commit = True
tag = True
parse = (?P<major>\d+) # major: 3.12 -> 3
\.
(?P<minor>\d+) # minor 3.12 -> 12
(\.(?P<patch>\d+))? # either a maintenance release 3.12.1 ...
((?P<release>a|rc)(?P<rel_num>\d+))? # or a rc, or an alpha 3.12a1, 3.12rc2
serialize =
{major}.{minor}
{major}.{minor}.{patch}
{major}.{minor}{release}{rel_num}
[bumpversion:part:release]
values =
a
rc
But then I get:
$ bump_version rel_num
Parsing version '3.12a1' using regexp '(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?((?P<release>a|rc)(?P<rel_num>\d+))?'
Parsed the following values: major=3, minor=12, patch=0, rel_num=1, release=a
Attempting to increment part 'rel_num'
Values are now: major=3, minor=12
Did not find key u'patch' in <bumpversion.Version:major=3, minor=12> when serializing version number
Opportunistic finding of new_version failed: Did not find key u'patch' in <bumpversion.Version:major=3, minor=12> when serializing version number
...
bumpversion: error: argument --new-version is required
Digging in the source code, I suspect the problem is somewhere near:
class VersionConfig(object):
# ....
def order(self):
# currently, order depends on the first given serialization format
# this seems like a good idea because this should be the most complete format
return self._labels_for_format(self.serialize_formats[0])
But maybe there’s something I’ve missed in the documentation…
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:12
Top Results From Across the Web
The Magic Prerelease Primer: Everything You Need to Know
Prerelease events are casual Sealed events that provide you with the first chance to play a new set by building a 40-card deck...
Read more >Magic The Gathering Prerelease Prize Support
Magic The Gathering Prerelease Prize Support Break Down By Attendance. We host multiple tournaments on each day of a prerelease weekend. Because of...
Read more >Prerelease | Magic: The Gathering - Wizards of the Coast
Your very first chance to play with the cards from a brand-new set. A week before the set is released, you can head...
Read more >Prerelease Module Versions - PowerShell - Microsoft Learn
The PowerShellGet module provides support for tagging modules with versions greater than 1.0.0 as a prerelease using semantic versioning.
Read more >Support prereleases for builtin extensions · Issue #144585 ... - GitHub
After discussing with @connor4312 we decided to remove js-debug-nightly extension and follow VS Code stable & insiders release model for js-debug extension.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
In case this helps, we’ve built an alternative called tbump
Prelease support looks like this:
And then you can use
tbump 1.6.1
. ortbump 1.6.0-r1
Cons: you have to type the whole version number on the command line instead of the ‘part’ you want to bump
Pros: the implementation is much simpler and supports many use cases.
The weird thing is, given
(note the absence of explicit
pre
andprenum
parts declaration, hence both are being implicitly set to default numeric part definitions under the hood), I can0.1.0
→bumpversion pre
→0.1.0-1.0
→bumpversion prenum
→0.1.0-1.1
→bumpversion prenum
→0.1.0-1.2
→bumpversion major
→1.0.0
.However, whenever custom
values
are set in any of extra part definitions,-{pre}.{prenum}
gets appended no matter what part is bumped.