github-release-notes icon indicating copy to clipboard operation
github-release-notes copied to clipboard

Separate templates for changelogs and releases

Open sergeysedykh opened this issue 6 years ago • 4 comments

As my repo is private, I'd like to keep links to issues in the release notes and remove them from the CHANGELOG.md file.

Any hints?

Thanks a lot for GREN, it's awesome!

sergeysedykh avatar Mar 21 '18 18:03 sergeysedykh

Hello @classyentrepreneur glad you're enjoying it!

Unfortunately, there is not an option that allows this scenario right now.

Something that could help would be to have a --config-file option and have two different npm scripts

alexcanessa avatar Mar 26 '18 15:03 alexcanessa

Something that could help would be to have a --config-file option and have two different npm scripts

I'm afraid, I don't understand :( Would you be so kind to provide some more details on how I could set it up?

Thanks a ton!

sergeysedykh avatar Mar 27 '18 07:03 sergeysedykh

Sorry I'll try to explain better:

Right now there isn't a way of achieving it in a clean way. The solution would be for us to create a --config option to select a different configuration file and therefore templates. At that point you could run:

# release uses default configuration file
gren release
# changelog uses a different one
gren changelog --config=.grenrc.changelog.js

I've created an issue to address it (#152).


... in the mean time ...

There is a manual and "hacky" way you can achieve this:

You might know that gren can be installed globally and from everywhere. What you need to do is (assuming you were releasing for this repo):

# "somedir" contains a .grenrc.js file with the configuration for the changelog
cd ~/somedir
# Run gren from that folder. It will use the configuration file available there
gren changelog --username=github-tools --repo=github-release-notes

alexcanessa avatar Mar 27 '18 12:03 alexcanessa

Thanks for the clarification!

I'm afraid, I already have the config file in the project folder used for the release notes :(

sergeysedykh avatar Mar 29 '18 16:03 sergeysedykh