Giter VIP home page Giter VIP logo

parse-a-changelog's Introduction

parse-a-changelog

This gem can be used to validate that a file conforms to the Keep a Changelog standard. It does this by defining a Keep a Changelog grammar and using the treetop parsing DSL to parse a changelog file according to that grammar.

Usage

Add parse-a-changelog to your Gemfile and bundle install or install it directly with:

gem install parse-a-changelog

The gem includes a binary that can be run with the changelog file as its single argument:

parse path/to/changelog

Or you can use the gem directly in your Ruby code:

result = ParseAChangelog::parse("path/to/changelog")

Finally, here is an example bash script that runs parse-a-changelog on the current directory in a Docker container, which can be useful for including changelog validation in a CI pipeline:

#!/bin/bash -ex

docker run \
  --rm \
  --volume "${PWD}/CHANGELOG.md":/CHANGELOG.md \
  cyberark/parse-a-changelog

Development

We welcome contributions of all kinds to parse-a-changelog. See our contributing guide.

Testing

Make sure you have the rspec gem installed in your current gem set then run the tests like so:

$ rspec
..................

Finished in 0.02494 seconds (files took 0.21634 seconds to load)
18 examples, 0 failures

Releasing

  1. Create a branch
  2. Determine the appropriate version using semver and update the VERSION file.
  3. Move the contents of the Unreleased section in CHANGELOG.md into a new section using the current release version and date.
  4. Update the links at the bottom of CHANGELOG.md.
  5. Commit these changes with a commit message about bumping the version.
  6. Run git tag <release-version> && git push origin --tags
  7. Create a PR to have the release approved and merged.
  8. Build the gem: gem build parse_a_changelog.gemspec
  9. Push the gem: gem push parse_a_changelog-<release-version>.gem (this may require setting up publishing credentials)

License

The parse-a-changelog gem is licensed under Apache License 2.0 - see LICENSE for more details.

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.