- Notifications
You must be signed in to change notification settings - Fork14
A library for generating conventional changelogs from git metadata, written in Rust
License
clog-tool/clog-lib
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
clog
A library for generating aconventional changelog from gitmetadata, written in Rust
clog creates a changelog automatically from your local git metadata. See theclogschangelog.md for an example.
The way this works, is every time you make a commit, you ensure your commitsubject line follows theconventional format.
NOTE:clog also supports empty components by making commit messages such asalias: message oralias(): message (i.e. without the component)
There are two ways to useclog, as a binary via the command line (Seeclog-cli for details) or as a library in your applications.
See thedocumentation for information on usingclog in yourapplications.
In order to see it in action, you'll need a repository that already has some ofthose specially crafted commit messages in it's history. For this, we'll usetheclog repository itself.
- Clone the
clog-librepository (we will clone to our home directory tomake things simple, feel free to change it)
$ git clone https://github.com/clog-tool/clog-lib
- Add
clogas a dependency in yourCargo.toml
[dependencies]clog ="*"
- Use the following in your
src/main.rs
externcrate clog;use clog::Clog;fnmain(){// Create the structletmut clog =Clog::with_git_work_tree("~/clog").unwrap().repository("https://github.com/thoughtram/clog").subtitle("Crazy Dog").changelog("changelog.md").from("6d8183f").version("0.1.0");// Write the changelog to the current working directory//// Alternatively we could have used .write_changelog_to("/somedir/some_file.md") clog.write_changelog().unwrap();}
- Compile and run `$ cargo build --release && ./target/release/bin_name
- View the output in your favorite markdown viewer!
$ vim changelog.md
clog can also be configured using a configuration file in TOML.
See theexamples/clog.toml for available options.
clog-cli- A command line toolthat uses this library to generate changelogs.- Commitizen - A command line tool thathelps you writing better commit messages.
clog is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.
About
A library for generating conventional changelogs from git metadata, written in Rust
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.