changelog

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 11 Imported by: 0

README

Build Status Go Report Card Latest Version License Repo Size

changelog

Elegant changelog generator.

Elegant/Simple/Efficient/Scalable

feature:

  • Cross-platform support
  • Preset template for generation
  • Custom template file
  • Conventional Commits Parser
  • Generate multiple versions of change logs

Here are some changelog that have been generated

Usage

$ changelog --help
changelog - a cli to generate changelog from git project

USAGE:
  changelog [OPTIONS] [version]

ARGUMENTS:
  [version]     Optional version or version range.
                1.null.
                  If you do not specify the version, then it will automatically
                  generate a change log from "HEAD~<latest version>" or
                  "HEAD~<earliest commit>" or "<latest version>-<last version>"
                2.single version. eg. v1.2.0
                  Generate a specific version of the changelog.
                3.version range. eg v1.3.0~v1.2.0
                  Generate changelog within the specified range.
                  For more details, please check the following examples.

OPTIONS:
  --help        Print help information.
  --version     Print version information.
  --dir         Specify the directory to be generated.
                The directory should contain a .git folder. defaults to $PWD.
  --file        Write output to file. default write to stdout.
  --fmt         The changelog format. Available options are "md"/"json".
                Defaults to "md".
  --preset      Cli built-in markdown template. Available options are "default".
                Only available when --fmt=md and --tpl is nil. Defaults to
                "default".
  --tpl         Specify the template file for generating. Only available when --fmt=md.

EXAMPLES:
  # generate changelog from HEAD to <latest version>. equivalent to 'changelog HEAD~tag:0'
  $ changelog

  # generate changelog of the specified version
  $ changelog v1.2.0

  # generate changelog within the specified range
  $ changelog v1.3.0~v1.2.0

  # generate changelog from HEAD to <Nth tag>
  $ changelog ~tag:0

  # generate changelog from <0th tag> to <2th tag>
  $ changelog tag:0~tag:2

  # generate changelog from HEAD to specified version
  $ changelog HEAD~v1.3.0

  # generate all changelog
  $ changelog HEAD~

  # generate changelog from two commit hashes
  $ changelog 770ed02~585445d

  # Generate changelog for the specified project
  $ changelog --dir=/path/to/project v1.0.0

SOURCE CODE:
  https://github.com/axetroy/changelog

Installation

If you are using Linux/macOS. you can install it with the following command:

# install latest version
curl -fsSL https://raw.githubusercontent.com/axetroy/changelog/master/install.sh | bash
# or install specified version
curl -fsSL https://raw.githubusercontent.com/axetroy/changelog/master/install.sh | bash -s v0.1.0
# or install from gobinaries.com
curl -sf https://gobinaries.com/axetroy/changelog@v0.1.0 | sh

Or

Download the executable file for your platform at release page

Then set the environment variable.

eg, the executable file is in the ~/bin directory.

# ~/.bash_profile
export PATH="$PATH:$HOME/bin"

then, try it out.

changelog --help

Finally, to use Deno correctly, you also need to set environment variables

# ~/.bash_profile
export PATH="$PATH:$HOME/.deno/bin"

Build from source code

Make sure you have Golang@v1.15.x installed.

$ git clone https://github.com/axetroy/changelog.git $GOPATH/src/github.com/axetroy/changelog
$ cd $GOPATH/src/github.com/axetroy/changelog
$ make build

Test

$ make test

How it works?

detail

License

The MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL