Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

getting merge conflicts in .cz.toml #977

Unanswered
dave-bakker asked this question in Q&A
Discussion options

I'm trying to get commitizen to fit my workflow. and I'm obviously mis-using it.
We have several branches (dev/staging/prod), people merge their branches to dev, then at some point dev merges to staging, and staging to prod, natch.
I have github set up with build configs for each branch, with dev getting prerelease: alpha, staging getting prerelease: rc, and prod nothing.
My goal was to have, for example dev have 1.5.6a0 merge to staging as 1.5.6rc0, which becomes 1.5.0 in prod. This way I could, for example, go back and debug a production issue with 1.5.0 by putting 1.5.0rc0 in staging

I have 2 issues:

  1. when I merge dev into staging, I will get a merge conflict in the .cz.toml, which actually makes sense
  2. how can I track dev builds (like 1.5.6a3 becomes 1.5.6rc0)
    am I just overcomplicating things? I need all of the builds tagged by environment because they can only be deployed in their environments.
You must be logged in to vote

Replies: 1 comment 6 replies

Comment options

Hi there! I'm having trouble following the versions, you mention that you are preparing a release candidate for 1.5.6, which you call 1.5.6rc0, but then you want to make that into 1.5.0? can you explain a bit more how would that work?

If you merge your 1.5.6rc0 to the prod branch, and then prod branch runs cz bump there shouldn't be any conflicts, cz should create the new commit with the updated version I believe.

You must be logged in to vote
6 replies
Comment options

cz doesn't create the new commit for me, unless I'm doing it wrong:

 ~/code/test- [staging] $ git merge develop 
Updating a2ff3e1..4a5271d
Fast-forward
 .cz.toml | 2 +-
 README.md | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
~/code/test- [staging] $ cz bump
[NO_COMMITS_FOUND]
No new commits found.
Comment options

the workflow is like this:
dev gets tagged something liek 1.5.6a0,
then when that merges to staging that gets tagged 1.5.6rc0,
then in prod (main), that becomes 1.5.6
so far so good, but when there is a 1.5.6a1, that gets merged and it tries to build 1.5.6rc0, which already exists.
why doesn't 1.5.6a1 become 1.5.6rc1?

Comment options

woile Feb 6, 2024
Maintainer

I think I understand your problem, this is something that can happen indeed. It doesn't become 1.5.6rc1 because commitizen doesn't make assumptions.
A possible solution, is to pass the build number to commitizen when bumping the release candidates, see the docs:
https://commitizen-tools.github.io/commitizen/tutorials/dev_releases/#example-2-github

Would that help?

Comment options

That would indeed help. now I need to figure out how to use --devrelease in github actions. It doesn't seem to be an option in commitizen-tools

Comment options

woile Feb 6, 2024
Maintainer

We may have to make it available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /