standard-version icon indicating copy to clipboard operation
standard-version copied to clipboard

feat: generate changelog from scratch

Open Conaclos opened this issue 6 years ago • 16 comments

Hi there!

Why

I encountered a problem in the genration of my changelog for several versions of a project. See this issue for more details.

What

I would like to generate from scratch my changelog and then have proper entries for each version.

Conaclos avatar Jul 22 '17 11:07 Conaclos

I've just used conventional-changelog-cli to do the job for me.

conventional-changelog -p angular -i CHANGELOG.md -s -r 0

This will generate the changelog for all your previouse tags.

weaintplastic avatar Sep 08 '17 16:09 weaintplastic

@weaintplastic Thanks for the suggestion :)

Conaclos avatar Sep 11 '17 21:09 Conaclos

standard-version --first-release doesn't work for you?

stevemao avatar Sep 12 '17 01:09 stevemao

@stevemao unfortunately not. --first-release is not going through the entire commit history and creates a changelog from scratch. It just does not bump the version number.

weaintplastic avatar Sep 12 '17 07:09 weaintplastic

@weaintplastic @Conaclos I'll lead with my periodic apology related to disappearing from open-source😛

One thought, perhaps we could document some advanced topics, e.g., using conventional-changelog to regenerate commits, in docs/advanced.md?

bcoe avatar Nov 29 '17 06:11 bcoe

I feel like this feature should live here too by adding another flag...

stevemao avatar Nov 30 '17 00:11 stevemao

@stevemao I agree. Would be really helpful to integrate that.

weaintplastic avatar Nov 30 '17 08:11 weaintplastic

+1

philpoore avatar May 26 '18 12:05 philpoore

+1

ronanjia avatar Aug 24 '18 11:08 ronanjia

+1

ekil1100 avatar Oct 16 '19 04:10 ekil1100

Simply adding resetChangelog: true to the context would make this possible.

const context = { version: newVersion, resetChangelog: true }

See: https://github.com/conventional-changelog/standard-version/blob/106d0390f7fe73c93131511caef17f2dca37fd6a/lib/lifecycles/changelog.js#L38-L46

Would be simple to implement with a command flag. Example: https://github.com/r15ch13/standard-version/commit/8561f1ca880b4eb000a614ae9dbc6f5fcaab2d60

r15ch13 avatar Oct 18 '19 20:10 r15ch13

^ would be quite a useful feature.

D-Nice avatar Dec 28 '19 21:12 D-Nice

Any progress on this?

snebjorn avatar Mar 17 '20 21:03 snebjorn

I need this too... Multiple years and nothing...

luizfelipelaviola avatar Apr 01 '22 19:04 luizfelipelaviola

conventional-changelog -p angular -i CHANGELOG.md -s -r 0

This works:

npx conventional-changelog-cli -p angular -i CHANGELOG-foo.md -s -r 0

See comment further above

escapedcat avatar Apr 02 '22 06:04 escapedcat

I have the opposite problem. When I run npm run release, I got a new tag, but all previous commits included. How can I separate commits, so it doesn't include commits from previous release , and just include new commits ?

stevenKirill avatar Aug 16 '23 16:08 stevenKirill