Closed
Labels
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 existsEnvironment
- commitizen version: 2.4.1
- python version: Python 2.7.16, Python3 3.9.0
- operating system: MacOS Catalina, 10.15.6
Activity
[-]Prevent Prerelease 'Bump' From Release Version[/-][+]Prevent Prerelease 'Bump' From Release Version With No Increment Detected[/+]Lee-W commentedon Oct 23, 2020
Hi @danhlee329 , thanks for reporting the bug! I think it relates to the code near here. Unfortunately, we're both at this moment and might not have time to fix it immdiately. Feel free to send us a PR. 🙂
woile commentedon Oct 27, 2020
I'll try to submit a patch for this during this week
fix: prevent prerelase from creating a bump when there are no commits
fix: prevent prerelase from creating a bump when there are no commits