question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No commits found to generate a pre-release

See original GitHub issue

Description

cz bump --prerelease rc should handle missing “bumpable” commits the same way as cz bump.

Steps to reproduce

  1. create a non-bumpable commit (i.e. ci or build)
  2. run cz bump --prerelease rc --dry-run

Current behavior

The command terminates with an error:

$ cz bump --prerelease rc --dry-run
[NO_COMMITS_FOUND]
No commits found to generate a pre-release.
To avoid this error, manually specify the type of increment with `--increment`

Desired behavior

It should behave like running cz bump without --prerelease flag.

$ cz bump --dry-run                
bump: version 1.2.1 → 1.2.1 [skip ci]
tag to create: v1.2.1
increment detected: None

Environment

  • commitizen version: 2.18.0
  • python version: 3.9.4
  • operating system: Darwin

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
m1racolicommented, Sep 16, 2021

Hmm … I am not sure yet.

If any release (alpha, beta, rc, prod) would bump the version if and only if there is a version increasing commit then we would not have a problem, no?

I kinda expect the following behaviour when there is no version increasing commit:

alpha -> alpha: do nothing
alpha -> beta: only create beta tag
alpha -> rc: only create rc tag
alpha -> release: only create relase tag

beta -> alpha: do nothing
beta -> beta: do nothing
beta -> rc: only create rc tag
beta -> release: only create release tag

rc -> alpha: do nothing
rc -> beta: do nothing
rc -> rc: do nothing
rc -> release: only create release tag

release -> alpha: do nothing
release -> beta: do nothing
release -> rc: do nothing
release -> release: do nothing

Basically we need to consider the different types of releases in a hierarchical order and only create a tag when we increase the level of release. And we’ll never increase the version if there is not version increasing commit.

I think it’s quite common to first release something as RC and later release the same code as release. 🤔

Does this make sense?

0reactions
nbrugger-tgmcommented, Nov 21, 2021

Hi, i basically run into the same issue (not being able to release a RC as PROD). Is there a recommended workflow/workaround to go from RC to PROD without commits in between?

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent Prerelease 'Bump' From Release Version With No ...
Successfully merging a pull request may close this issue. fix: prevent prerelase from creating a bump when there are no commits commitizen-tools ...
Read more >
Version Incrementing - GitVersion
Semantic Versioning is all about releases, not commits or builds. This means that the version only increases after you release, this directly conflicts...
Read more >
Semantic-Release - pre-release version not incrementing for ...
Ran npx semantic-release locally on my computer while have the beta branch checked out after having a commit that would increment the version....
Read more >
Semantic Versioning 2.0.0 | Semantic Versioning
Additional labels for pre-release and build metadata are available as extensions to ... without having to release new versions of every dependent package)....
Read more >
Configuration — python-semantic-release 7.32.2 documentation
The format of a prerelease version will be {tag_format}-{prerelease_tag}. ... will create a new patch release even if there is no tag in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found