gitchangelog problems with release versions

343 Views Asked by At

I am using gitchangelog as indicated here with the reference configuration file unchanged.

I have tagged one commit with v1.0.2:

0d34763 new: added generic 400 bad request for typeerrors when creating input_data

in addition to having one commit named as follows:

5f3d5b4 new: Added new changelog feature (1.0.1)

The output of

gitchangelog

nevertheless gives me

Changelog
=========


(unreleased)
------------

New
~~~
- Added generic 400 bad request for typeerrors when creating input_data.
  [user]
- Added new changelog feature (1.0.1) [user]

Does anyone know how I get

Changelog
=========

1.0.2 (2011-04-07)
------------------

New
~~~
- Added generic 400 bad request for typeerrors when creating input_data.
  [user]

1.0.1 (2011-04-03)
------------------

New
~~~
- Added new changelog feature (1.0.1) [user]

Instead of always (unreleased) ?

Even just one commit to be shown in gitchangelog as a release would be great.

I would really like to know how, as gitchangelog in combination with sphinx is wonderful for documentation.

Thanks for any help.

2

There are 2 best solutions below

0
On BEST ANSWER

Ok solved this one. Readme is a bit confusing. Tags have to be added to the commit in the format which will be recognised here:

and the version not only written into the commit message. Not obvious from the readme.

Attention: how you write your tag should match configuration in .rc file so it gets picked up by the regexp here: https://github.com/vaab/gitchangelog/blob/master/src/gitchangelog/gitchangelog.rc.reference#L153

0
On

In some cases the tag starts with v. If this is the same for you then in your config .rc file add v in the re expression

eg

tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'

to include v

tag_filter_regexp = r'^v[0-9]+\.[0-9]+(\.[0-9]+)?$'