From 83ccab2905e0296f343fec8e15555f8d5fc45097 Mon Sep 17 00:00:00 2001 From: tsuyoshiwada Date: Sat, 5 May 2018 22:13:56 +0900 Subject: [PATCH] docs: Add document related on `--next-tag` --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c31cc83..da5749ae 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ USAGE: There are the following specification methods for . - 1. .. - Commit contained in tags from . + 1. .. - Commit contained in tags from . 2. .. - Commit from the to the latest tag. 3. .. - Commit from the oldest tag to . 4. - Commit contained in . @@ -163,6 +163,7 @@ OPTIONS: --init generate the git-chglog configuration file in interactive --config value, -c value specifies a different configuration file to pick up (default: ".chglog/config.yml") --output value, -o value output path and filename for the changelogs. If not specified, output to stdout + --next-tag value treat unreleased commits as specified tags (EXPERIMENTAL) --silent disable stdout output --no-color disable color output [$NO_COLOR] --no-emoji disable emoji output [$NO_EMOJI] @@ -194,7 +195,7 @@ EXAMPLE: $ git-chglog --config custom/dir/config.yml - The above is a command that uses a configuration file placed other than ".chglog/config.yml". + The adove is a command that uses a configuration file placed other than ".chglog/config.yml". ``` @@ -486,6 +487,25 @@ See godoc [RenderData][doc-render-data] for available variables. By displaying it on the standard output, it makes it easy to change the contents. +
+ Can I commit CHANGELOG changes before creating tags? + + Yes, it can be solved by using the `--next-tag` flag. + + For example, let's say you want to upgrade your project to `2.0.0`. + You can create CHANGELOG containing `2.0.0` as follows. + + ```bash + $ git-chglog --next-tag 2.0.0 -o CHANGELOG.md + $ git commit -am "release 2.0.0" + $ git tag 2.0.0 + ``` + + The point to notice is that before actually creating a tag with git, it is conveying the next version with `--next-tag` :+1: + + This is a step that is necessary for project operation in many cases. +
+