Giter VIP home page Giter VIP logo

changelog-sh's Introduction

Changelog.sh

changelog.sh is a tool to keep a changelog without conflicts. It supports rendering your changelog into a standard keepachangelog format.

This is a fork of whitecloakph/changelog-sh with extensive changes to the functionality. See the CHANGELOG.md for a list of changes.

Motivation

Maintaining a CHANGELOG.md is annoying because it's prone to merge conflict. Multiple developer adding line to a single file will confuse git as to which change should go first.

Solution

The solution is to create a file for each changelog entry that can be commited to git. This strategy avoid merge conflicts when multiple developers add a changelog entry.

How it works

New changes are recorded using the change new [changetype] [changelog entry] command. Each change is written into a changelog/unreleased directory as a separate file.

Having a changelog directory looking like this:

changelog/
  unreleased/
    added/
      19860806201409
    changed/
      19860806144612
    fixed/
      19860806092409
      19860806202703

would yield a new entry in the CHANGELOG.md that would like this:

## [Unreleased] - 1987-07-27
### Added
- Never gonna give you up

### Changed
- Never gonna let you down

### Fixed
- [124] Never gonna run around and desert you
- [123] Never gonna make you cry

This can be displayed using the change preview command.

When a new release is created this entry is inserted into the CHANGELOG.md file and the files in changelog/unreleased are automatically deleted or moved.

The change full-preview 2.0.0 command can show you what the CHANGELOG.md file would look like if the unreleased changes were to be released as version 2.0.0:

# What's new?

## [2.0.0] - 1987-07-27
### Added
- Never gonna give you up

### Changed
- Never gonna let you down

### Fixed
- [124] Never gonna run around and desert you
- [123] Never gonna make you cry

## [1.1.0] - 1987-05-03
### Added
- Never gonna say good bye

## [1.0.0] - 1986-12-07
### Added
- Never gonna tell a lie and hurt you

The change release 2.0.0 command can then be used to write the new version into the CHANGELOG.md file and remove the files in changelog/unreleased, so they are not released again.

Getting Started

Basic Installation

Changelog.sh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget. (Take a look at the install.sh first!)

via curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/mricherzhagen/changelog-sh/master/tools/install.sh)"

via wget

sh -c "$(wget -O - https://raw.githubusercontent.com/mricherzhagen/changelog-sh/master/tools/install.sh)"

Shell autocompletion

There is experimental autocompletion support for bash and zsh available.

for bash

Add to your .bashrc:

source ~/.change/tools/change-completion.bash

for zsh

Add to your .zshrc:

source ~/.change/tools/_change-completion.zsh

Basic Usage

Initialize

change init

Add new change

change new {type_of_change} {message}

Preview changelog in Markdown format

change preview

Release changes

change release {version}

Version bumping

The preview, full-review and release commands can take the arguments bump-major, bump-minor and bump-patch to automatically calculate the next version number.

You can also use bump-major-something to append -something to the generated version.

changelog-sh's People

Contributors

chardskarth avatar clrke avatar mricherzhagen avatar theoryofnekomata avatar xdgimf avatar

Stargazers

 avatar

Watchers

 avatar

changelog-sh's Issues

Workflow is bad when changes to Changelog need to be done

Options:

  • add something like change release bump-minor --edit to prompt for changelog changes
  • Only stage changes and print git commands for tag creation after commit (like it's done for pushing now)
  • Split release command into 2 phase: stage/commit

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.