Changelog generator using Commit History
To see an example of this in action, you can check the actions file for this repo. Yes it uses itself to generate the release logs
[](https://github.com/barelyhuman/commitlog)
I'd like to keep building more such tools and do them full time instead of doing it during the weekend, help achieve that if you like the tool.
Binaries are available on the Github releases
This step is for people who want to use the latest version from the repositories which hasn't been added to releases as a binary yet and for people viewing this on sourcehut , as the binaries aren't uploaded to sourcehut.
- Make sure you have go installed on your system , minimum version
1.15
- You can either clone the whole repo from sourcehut / github or downlad a tar.gz from sourcehut / github
git clone https://git.sr.ht/~reaper/commitlog
# or
git clone https://github.com/barelyhuman/commitlog
cd commitlog
go build
tar -xvzf commitlog-<hash>.tar.gz
cd commitlog
go build
# to install it to go's bin folder and use the commitlog command during dev or as a perm install
go install
Source: commitlog-web
Web App: commitlog-web
The usage is pretty simple, this cli tool assumes that you use commitlint standards while writing your commits, if not it's okay everything will be classified under Other Changes
instead of being grouped according to type of commit.
Simple Overview
ci: <message>
- for ci/cd changes
feat|feature: <message>
- for feature changes
docs: <message>
- for documents or comment updations in code
refactor: <message>
- performance / code clean up changes or total BLOC changes
fix: <message>
- for fixes (self-explanatory)
The below mentioned are the flags supported by the current branch and older tags might not support the flags
or certain inputs in flags, use the -h
flag to see what's supported on the version you are using.
Usage of commitlog:
-e string
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
to stop collecting commit message at
-i string
commit types to be includes (default "ci,refactor,docs,fix,feat,test,chore,other")
-p string
path to the repository, points to the current working directory by default (default ".")
-s string
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
to start collecting commit messages from
-skip
if true will skip trying to classify and just give a list of changes
> commitlog
# which is the shorthand of
> commitlog log -p .
As of 0.0.6 there's an experimental release subcommand that can be used for version tagging
## Fixes
97c582b3eb5a6796ef9c250d9653ad90dce63cbe - example fix
## Other Changes
da6d837eb3134f836bfbe401de7882f2e0818ba8 - Create LICENSE
b0f1b1d2bc4265cb72b70b3ae5b60f8e65f47b12 - initial commit
As of 0.0.7-dev.7 the cli comes with a sub command to maintain version for the repository.
The command will
- create the
.commitlog.release
file to handle and persit the version - handle the semver increments
- create a new commit and tag for the same
$ commitlog release -beta -beta-suffix dev
Current Version:
v0.0.7-dev.6
New Version
0.0.7-dev.7
? Do you want me to create a commit for the new version?: Yes
✔ Updated Version
- No Tests added so is probably unstable right now ( If you'd like to help writing tests, feel free to raise a PR)
- Doesn't work inside a nested folder in the repository, needs to be on the root of the repository to work. (you can use the
-p
flag to set a path to generate logs from)