cucumber / changelog

Read, validate and manipulate CHANGELOG.md files that follow keepachangelog.com specification
MIT License
3 stars 1 forks source link

changelog latest should work for unreleased projects #12

Open mpkorstanje opened 2 years ago

mpkorstanje commented 2 years ago

πŸ‘“ What did you see?

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added
- First release of polyglot-release
mpkorstanje@Nyx:~/Projects/cucumber/polyglot-release$ changelog latest
Error: There are no released versions in the changelog yet
There are no released versions in the changelog yet
mpkorstanje@Nyx:~/Projects/cucumber/polyglot-release$ echo $?
1

By exiting with 1 we can not determine if there was a problem in the changelog or simply no version. This makes it impossible to use changelog in conjuction with automated tooling to make a first release (i.e. https://github.com/cucumber/polyglot-release/issues/68).

βœ… What did you expect to see?

Either exit code 0, and an empty string.

πŸ“¦ Which tool/library version are you using?

Latest version I guess. But see: https://github.com/cucumber/changelog/issues/11

mattwynne commented 2 years ago

There's some coupling here to be aware of:

https://github.com/cucumber/action-get-versions/blob/main/entrypoint.sh#L5 works around the current behaviour. If we change this, we could also simplify that code.