Tag command produces error with only 1 version
Lansoweb opened this issue · comments
Leandro Silva commented
- I was not able to find an open or closed issue matching what I'm seeing.
- This is not a question. (Questions should be asked on slack (Signup for Slack here) or our forums.)
Provide a narrative description of what you are trying to accomplish.
If the CHANGELOG has only 1 version, the tag
command fails. Same behaviour with any version number (eg. 3.0.0, etc). Will investigate this issue and create a PR.
Code to reproduce the issue
$ vendor/bin/keep-a-changelog new
Created new changelog in file "/private/tmp/changelog-test/CHANGELOG.md" using initial version "0.1.0".
$ vendor/bin/keep-a-changelog entry:added "Testing"
Preparing entry for Added section
Writing "Added" entry to /private/tmp/changelog-test/CHANGELOG.md
$ git add CHANGELOG.md .gitignore composer.json
...
$ git commit -m "Test 1"
...
$ git push
...
$ vendor/bin/keep-a-changelog ready
Setting release date of most recent changelog to "2018-04-19"
$ vendor/bin/keep-a-changelog tag 0.1.0
In InvalidChangelogFormatException.php line 18:
Changelog entry found for version 0.1.0, but it appears to be formatted incorrectly.
$ vendor/bin/keep-a-changelog bump
Bumped changelog version to 0.1.1
$ vendor/bin/keep-a-changelog ready
Setting release date of most recent changelog to "2018-04-19"
$ vendor/bin/keep-a-changelog tag 0.1.1
Created tag "0.1.1" for package "changelog-test" using the following notes:
Added
-----
...
Expected results
Tag working with the first version.
Actual results
Error produced above.