Coder Social home page Coder Social logo

martypitt / conventional-changelog-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from conventional-changelog-archived-repos/conventional-changelog-cli

0.0 2.0 0.0 31 KB

:pencil2::scroll: Generate a changelog from git metadata

License: MIT License

JavaScript 100.00%

conventional-changelog-cli's Introduction

conventional-changelog-cli

Join the chat at https://gitter.im/conventional-changelog/conventional-changelog-cli

NPM version Build Status Dependency Status Coverage percentage

Generate a changelog from git metadata

Changelog?

Note You don't have to use the angular commit convention. For the best result of the tool to tokenize you commit and produce flexible output, it's recommended to use a commit convention.

Quick start

$ npm install -g conventional-changelog-cli
$ cd my-project
$ conventional-changelog -p angular -i CHANGELOG.md -s

This will not overwrite any previous changelog. The above generates a changelog based on commits since the last semver tag that match the pattern of a "Feature", "Fix", "Performance Improvement" or "Breaking Changes".

If you first time use this tool and want to generate all previous changelog, you could do

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

This will overwrite any previous changelog if exist.

All available command line parameters can be listed using CLI: conventional-changelog --help.

Hint: You can alias your command or add it to your package.json. EG: "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0".

To fully customize the tool, please checkout conventional-changelog and conventional-changelog-core docs. You can find more details there. Note: config here can work with preset, which is different than options.config in conventional-changelog.

Example output

Recommended workflow

  1. Make changes
  2. Commit those changes
  3. Make sure Travis turns green
  4. Bump version in package.json
  5. conventionalChangelog
  6. Commit package.json and CHANGELOG.md files
  7. Tag
  8. Push

The reason why you should commit and tag after conventionalChangelog is that the CHANGELOG should be included in the new release, hence gitRawCommitsOpts.from defaults to the latest semver tag.

If you use npm version, it auto tags immediately after changing the version in package.json. In such case, you might want to specify the version manually and generate the changelog before npm version.

Please use this gist to make a release or change it to your needs.

Why

  • Used by AngularJS, JSHint and related projects.
  • Easy fully automate changelog generation. You could still add more points on top of it.
  • Ignoring reverted commits, templating with handlebars.js and links to references, etc. Open an issue if you want more reasonable features.
  • Intelligently setup defaults but yet fully configurable with presets of popular projects.
  • Everything internally or externally is pluggable.
  • A lot of tests and actively maintained.

Problems with github-changelog-generator or similar projects

  • Opinionated on how to write commits, issues or PRs.
  • No or partially support reference links.
  • Not system agnostic. Only support GitHub.
  • No template support. The output is mostly certain format of markdown.
  • No presets of popular commit message conventions.
  • Not modularized. Over the years modularization is proven to be the best practice.
  • No tests or coverage is too low. Program might be buggy.
  • Do not read your project's environment.
  • No or few task runner or build tool integrations.

Related

License

MIT © Steve Mao

conventional-changelog-cli's People

Contributors

gitter-badger avatar marionebl avatar stevemao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.