Crates.io | ccclog |
lib.rs | ccclog |
version | 0.4.0 |
source | src |
created_at | 2020-05-16 11:36:53.947142 |
updated_at | 2020-05-22 12:46:33.133928 |
description | Generate changelog from git commit |
homepage | |
repository | https://github.com/watawuwu/ccclog |
max_upload_size | |
id | 242333 |
size | 141,600 |
Generate changelog from commit messages created by Conventional Commits.
❯❯ ccclog
## [0.0.0] - 2020-05-16
### Feat
- [[6274215]] add essential feature (Wataru Matsui)
- [[e4cff17]] add init (Wataru Matsui)
[0.0.0]: https://github.com/watawuwu/ccclog/compare/0eb9fad...0.0.0
[6274215]: https://github.com/watawuwu/ccclog/commit/62742151681860a5f9513510015035a8c0f6fdba
[e4cff17]: https://github.com/watawuwu/ccclog/commit/e4cff17b4c8b7103cea4e36eb34dd539937af4ba
USAGE:
ccclog [FLAGS] [OPTIONS] [--] [ARGS]
FLAGS:
-e, --enable-email-link Make a link to the author using git config.email
-h, --help Prints help information
-r, --reverse Reverse commit display order
-V, --version Prints version information
OPTIONS:
-s, --ignore-summary <ignore-summary>
Ignore summary use regex. Syntax: https://docs.rs/regex/1.3.7/regex/#syntax
-t, --ignore-types <ignore-types>...
Ignore commit type. ex) feat|fix|build|doc|chore|ci|style|refactor|perf|test
-i, --root-indent-level <root-indent-level> Change markdown root subject indent [default: 2]
-p, --tag-prefix <tag-prefix> If there are multiple tag formats, specify the target prefix
ARGS:
<REPO_PATH> Working directory of git [default: .]
<REVISION_SPEC> Revision spec. Ref to https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
repo_path
Working directory of git.
revision_spec
Revision spec. Ref to https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection
options
ccclog command option. Options that can be specified on the command line can be specified as they are (multiple options allowed).
ex) --reverse --tag-prefix=prefix-v
changelog
Generated changelog
name: Github Action Sample
on:
push:
tags:
- '*.*.*'
jobs:
create_github_release:
name: Create Github release
# If you use actions, use the platform that docker works
runs-on: ubuntu-latest
steps:
- name: Setup code
uses: actions/checkout@v2
with:
# Set the required number to create a changelog.
# If the history is small, it is recommended to specify 0 and acquire all history.
fetch-depth: 0
- name: Fetch all tags
# Get the tags to create history
# `actions/checkout@v2` has the --not-tags option
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Create Changelog
id: create_changelog
uses: watawuwu/ccclog@gha-v0
# with:
# repo_path: "."
# revision_spec: "..HEAD"
# options: '--root-indent-level=3 --tag-prefix=component-v --ignore-summary=cargo\srelease.+'
# You can also exec the binary
# - name: Create Changelog
# id: create_changelog
# shell: bash -x {0}
# run: |
# mkdir bin && curl --tlsv1.2 -sSf https://raw.githubusercontent.com/watawuwu/ccclog/master/install.sh | sh -s -- --prefix ./
# changelog="$(bin/ccclog)"
# changelog="${changelog//$'\n'/'%0A'}"
# echo "::set-output name=changelog::$changelog"
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
# outputs.changelog parameter is available
body: ${{ steps.create_changelog.outputs.changelog }}
❯❯ curl --tlsv1.2 -sSf https://raw.githubusercontent.com/watawuwu/ccclog/master/install.sh | sh
❯❯ git clone https://github.com/watawuwu/ccclog.git && cd ccclog
❯❯ make install
❯❯ cargo install ccclog
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning.
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.