conventional-changelog / standard-version

:trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
ISC License
7.69k stars 794 forks source link

feat: generate changelog from scratch #201

Open Conaclos opened 7 years ago

Conaclos commented 7 years ago

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.

weaintplastic commented 7 years ago

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.

Conaclos commented 7 years ago

@weaintplastic Thanks for the suggestion :)

stevemao commented 7 years ago

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

weaintplastic commented 7 years ago

@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.

bcoe commented 6 years ago

@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?

stevemao commented 6 years ago

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

weaintplastic commented 6 years ago

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

philpoore commented 6 years ago

+1

ronanjia commented 6 years ago

+1

ekil1100 commented 5 years ago

+1

r15ch13 commented 5 years ago

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

D-Nice commented 4 years ago

^ would be quite a useful feature.

snebjorn commented 4 years ago

Any progress on this?

luizfelipelaviola commented 2 years ago

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

escapedcat commented 2 years ago

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

stevenKirill commented 1 year ago

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 ?