Skip to content

feature_request(option): adding changelog to multiple files #22

@Kristinita

Description

@Kristinita

1. Summary

It would be nice if release-it-changelogen could add a changelog to multiple files, not solely to one file. If it’s already possible, it would be nice if release-it-changelogen documentation will describe, what users need to do.

2. Justification of the need of the feature

I created packages for Sublime Text. Maintainers of Sublime Text packages should create messages for users. I want to automate creating messages. To do this I need automatically:

  1. Append a changelog of new release to the beginning of the file CHANGELOG.md.
  2. Add a changelog of new release to new file messages/{{newVersion}}.txt.

I don’t understand how I can realize this desired behavior when using release-it-changelogen.

3. Example of desired behavior

For example, it would be nice if release-it-changelogen will support settings like these in the file .release-it.yaml:

plugins:
  release-it-changelogen:
    changelogPaths:
    - CHANGELOG.md
    - messages/{{newVersion}}.txt

release-it-changelogen with this configuration will add a changelog to both files: CHANGELOG.md and messages/{{newVersion}}.txt.

4. Not helped

4.1. “Just use hooks”

Yes, I read about release-it hooks, but I don’t understand how I can get desired behavior use them:

  1. If I use the command changelogen --bump in the hook, Changelogen adds a changelog to one file. Changelogen itself can’t add a changelog to multiple files. Also, Changelogen with the command-line argument --bump changes the value of the key version in the file package.json, it conflicts with the behavior of release-it.

  2. If I use a command like changelogen | tee messages/${version}.txt in the hook, Changelogen doesn’t add expected changelog to the file messages/${version}.txt. It adds a changelog like this:

    ## v1.9.39...KiraReleaseIt
    
    [**compare changes**](https://github.com/Kristinita/SashaGitHub/compare/v1.9.39...KiraReleaseIt)
    
    ### 🛡 Deployment
    
    - **release-it:** Try to disable package-lock.json ([**0e869f0**](https://github.com/Kristinita/SashaGitHub/commit/0e869f0))
    
    ### ❤️ Contributors
    
    - Kristinita ([**@Kristinita**](https://github.com/Kristinita))

    Instead of correct changelog:

    # Changelog
    
    ## v1.9.40
    
    [**compare changes**](https://github.com/Kristinita/SashaGitHub/compare/v1.9.39...v1.9.40)
    
    ### 🛡 Deployment
    
    - **release-it:** Try to disable package-lock.json ([**0e869f0**](https://github.com/Kristinita/SashaGitHub/commit/0e869f0))
    
    ### ❤️ Contributors
    
    - Kristinita ([**@Kristinita**](http://github.com/Kristinita))
  3. If I use any Changelogen command in hooks, the version provided by Changelogen may conflict with the version provided by release-it.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions