Closed
Description
Description
When there is already a release, shouldn't we be prevented from creating a prerelease version from the release version? Found this to be odd as this goes against the proper flow of change denoted via semantic versioning (https://semver.org/#spec-item-3). Perhaps this should only be allowed if increment detected
is not None
.
Steps to reproduce
# Commits prior to bumps have been done, but are omitted here for the
# sake of displaying bump behavior
➜ cz bump -pr alpha
bump: version 0.1.0 → 0.1.1a0
tag to create: 0.1.1a0
increment detected: PATCH
Done!
# Tag '0.1.1' Created
➜ cz bump
bump: version 0.1.1a0 → 0.1.1
tag to create: 0.1.1
increment detected: None
Done!
# Release to prerelease 'bump' here
➜ cz bump -pr beta
bump: version 0.1.1 → 0.1.1b0
tag to create: 0.1.1b0
increment detected: None
Done!
➜ cz bump -pr beta
bump: version 0.1.1b0 → 0.1.1b1
tag to create: 0.1.1b1
increment detected: None
Done!
# Tag '0.1.1' Already Exists
➜ cz bump
bump: version 0.1.1b1 → 0.1.1
tag to create: 0.1.1
increment detected: None
fatal: tag '0.1.1' already exists
Environment
- commitizen version: 2.4.1
- python version: Python 2.7.16, Python3 3.9.0
- operating system: MacOS Catalina, 10.15.6