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.

cz bump -ch doesn't create commit, tag and changelog

See original GitHub issue

Description

I really don’t know if it’s a bug or it’s me that I don’t understand how this works…

It seems to me that my cz bump -ch only changes the version in my files, but doesn’t do the other stuff I wish it would have done:

  • generate the changelog;
  • create a commit for the version bump and the changelog;
  • create a tag for that commit.

Steps to reproduce

  1. Set up a python project with poetry, and add this to pyproject.toml:
    [tool.commitizen]
    version = "0.1.0"
    version_files = ["pyproject.toml:version"]
    tag_format = "v$version"
    bump_message = "build: release $current_version → $new_version"
    
  2. commit some code and manually create a v0.1.0 tag
  3. change something and use cz c to commit them
  4. run cz bump -ch

Current behavior

$ cz bump -ch
message
tag to create: v0.2.0
increment detected: MINOR
  • version is correctly bumped in pyproject.toml;
  • no commit is created (as you can see message is displayed instead of the expected bump message; this occurs even if I remove the custom bump_message from pyproject.toml);
  • changelog is not updated;
  • no tag is created.

Desired behavior

What I listed on the description.

Note that cz changelog --dry-run result is somewhat good (I don’t know why there are 's in the v.0.1.0 title, but its section is empty because the I messed up the commit message on MR merge).

## Unreleased

### Feat

- **api**: add new endpoint

## 'v0.1.0 (2020-07-27')

Environment

  • commitizen version: 2.0.0
  • python version: 3.7.0 (miniconda)
  • operating system: Windows 10 64 bit 1909

I also tried this on a WSL ubuntu 20.04 with python 3.7.8, same problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sanzoghenzocommented, Aug 1, 2020

I’m afraid I can’t do this right now, I’m away from my pc, you have to wait till Monday 😉

1reaction
woilecommented, Aug 1, 2020

Oh okay, so in your log you have v0.1.0, but when commitizen parses them, is adding the ' 🤔

Can you give me the output of this 2 functions?

git tag --format="%(refname:lstrip=2)---inner_delimiter---%(objectname)---inner_delimiter---%(committerdate:format:%Y-%m-%d)" --sort=-committerdate
git tag --format='%(refname:lstrip=2)---inner_delimiter---%(objectname)---inner_delimiter---%(committerdate:format:%Y-%m-%d)' --sort=-committerdate

Maybe I can use " instead of '

Read more comments on GitHub >

github_iconTop Results From Across the Web

bump command doesn't create tags · Issue #885 - GitHub
running the following command: cz bump. I would expect cz to: update the version number; commit the bump; create a tag; update the...
Read more >
Git Tutorial for Absolute Beginners from Zero to Hero - Part 15
In this video we will learn about the importance of conventions, talk about semantic versioning aka semver and conventional commits.
Read more >
The way to fully automated releases in open source projects
They both bump the version based on the commit logs, generate a CHANGELOG , create a Tag and commit the changes. Still, their...
Read more >
Organize Your Git Commits Using Commitizen - Vishnu's Blog
Select the type of change you are committing docs: Documentation only changes ? Scope. Could be anything specifying place of the commit change...
Read more >
How are you writing a commit message? - DEV Community ‍ ‍
Summary · The description must be a short description of the changes in the commit and must be after the type with or...
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