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 tag found to do an incremental changelog

See original GitHub issue

Description

I want to use commitizen in my repository and automatically bump vresion to pipy (and maybe someday conda-forge). Looking at the documentation I started with github actions that are still not compatible with my repository structure (I have a main branch and I’m working directly on it).

So I wanted to go with the CLI that looks exactly like what i needed:

I created a .cz.yaml file:

commitizen:
  changelog_file: CHANGELOG.md
  changelog_incremental: true
  changelog_start_rev: v0.12.9
  name: cz_conventional_commits
  tag_format: v$major.$minor.$patch$prerelease
  update_changelog_on_bump: true
  version: 0.12.10
  version_files:
  - setup.py:version
  - ost/__init__.py:__version__ 

and did little modifications

Steps to reproduce

When I run cz bump I get the following error message:

No tag found to do an incremental changelog

If I clean the changelog.md file, it works but I then only have the latest tag and not the previous one.

So I changed the .cz.yaml file to bump the changelog in a second step:

update_changelog_on_bump: false

Then the tag is created but running cz changelog end up with the same error message. When I print my tags they are all here even some that I don’t want to use:

$ git tag 

0.10.1
0.12.5
0.12.6
0.9.4
v0.12.10
v0.12.7
v0.12.8
v0.12.9

It looks like a chicken & egg problem, what did I miss in my configuration?

Environment

Commitizen Version: 2.20.2 Python Version: 3.8.3 (default, Oct 14 2020, 12:53:46) [Clang 11.0.3 (clang-1103.0.32.29)] Operating System: Darwin

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
12rambaucommented, Jul 21, 2022

I’ll look at the test structure to see if I can generate more exotic version convention (vers_, version., v- etc) and check how they behave with the current value

1reaction
woilecommented, Jan 12, 2022

It works fine on my side. I cloned, run cz bump and the tag created was v_2.5.3 with the changelog.

My conf:

$ cz version
2.17.11

on ubuntu

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Bump failes if Changelog exists · Issue #357 - GitHub
When i run cz bump it fails unless i delete the CHANGELOG.md generated by ... detected: MINOR No tag found to do an...
Read more >
Changelog - Commitizen - GitHub Pages
incremental · Build from latest version found in changelog, this is useful if you have a different changelog and want to use commitizen...
Read more >
Automating Version Tags and Changelogs for your Python ...
A hands-on guide to automating version tags and changelogs based on your project's commit history with commitizen. Tired of keeping track of ...
Read more >
How can I generate a changelog in github without showing ...
I ran into something similar in the past and change to use this action instead, which generate the incremental changelog. – GuiFalourd. Oct...
Read more >
Changelog entries - GitLab Docs
If your merge request has multiple commits, make sure to add the Changelog entry to the first commit. This ensures that the correct...
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