Skip to content

Commit 937a4c1

Browse files
committed
add detailed docs
1 parent 969e5ba commit 937a4c1

File tree

13 files changed

+490
-144
lines changed

13 files changed

+490
-144
lines changed

.github/workflows/docs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Docs
2+
on: [push]
3+
jobs:
4+
build-docs:
5+
concurrency: ci-${{ github.ref }}
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout 🛎️
9+
uses: actions/checkout@v3
10+
11+
- name: Install and Build
12+
run: ./scripts/generate-docs.sh
13+
14+
- name: Deploy 🚀
15+
uses: JamesIves/[email protected]
16+
with:
17+
token: ${{ secrets.GH_TOKEN }}
18+
branch: gh-pages
19+
folder: dist

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CHANGELOG.md
22
./commitlog
3-
.DS_Store
3+
.DS_Store
4+
dist

README.md

Lines changed: 15 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,28 @@
11
<p align="center">
2-
<img src="assets/commitlog.png" height="64">
2+
<img src="https://raw.githubusercontent.com/barelyhuman/commitlog/main/assets/commitlog.png" height="64">
33
<p align="center">Changelog generator using Commit History</p>
44

5-
[![Test](https://github.com/barelyhuman/commitlog/actions/workflows/test.yml/badge.svg)](https://github.com/barelyhuman/commitlog/actions/workflows/test.yml)
6-
![Binary Builds](https://github.com/barelyhuman/commitlog/workflows/Binary%20Builds/badge.svg)
7-
![Binary Builds Pre-Releases](https://github.com/barelyhuman/commitlog/workflows/Binary%20Builds%20Pre-Releases/badge.svg)
85
[![Go Report Card](https://goreportcard.com/badge/github.com/barelyhuman/commitlog)](https://goreportcard.com/report/github.com/barelyhuman/commitlog)
9-
[![commitlog](https://img.shields.io/badge/changelogs-commitlog-blue)](https://github.com/barelyhuman/commitlog)
10-
![Hits](https://hits.link/hits?url=https%3A%2F%2Fgithub.com%2Fbarelyhuman%2Fcommitlog)
116

12-
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
7+
## Philosophy
138

14-
## Sheilds | Badges
9+
- Work on all major operating systems
10+
- Not platform dependent, not tied to Github, Gitlab, or anything. It's just markdown.
11+
- Ability to generate change logs between version tags
12+
- Handle release versioning of the project
13+
- Stay small
1514

16-
[![commitlog](https://img.shields.io/badge/changelogs-commitlog-blue)](https://github.com/barelyhuman/commitlog)
15+
## Why
1716

18-
```markdown
19-
[![commitlog](https://img.shields.io/badge/changelogs-commitlog-blue)](https://github.com/barelyhuman/commitlog)
20-
```
17+
Every language has it's own isolated version of a tool like this, for someone who works with multiple languages, it's easier to
18+
have the same tool working everywhere, without having to setup something get it working. There's an even tighter scoped version of this, [nimclog](https://github.com/barelyhuman/nimclog).
2119

22-
## Support
20+
The point of the tool is not to create super descriptive changelogs for you but to help your changelogs have enough information for you as a developer to be able to write proper changelogs while having references to the changes in one place.
2321

24-
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.
22+
## Documentation
2523

26-
## Install
24+
The documentation can be read from the `docs` folder of the repository, or on the [website](https://barelyhuman.github.io/commitlog)
2725

28-
Binaries are available on the Github [releases](https://github.com/barelyhuman/commitlog/releases)
26+
## License
2927

30-
or you can use goblin
31-
32-
```sh
33-
curl -sf https://goblin.reaper.im/github.com/barelyhuman/commitlog | sh
34-
```
35-
36-
## Build
37-
38-
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.
39-
40-
- Make sure you have go installed on your system , minimum version `1.15`
41-
- You can either clone the whole repo from sourcehut / github or downlad a tar.gz from sourcehut / github
42-
43-
### With Clone
44-
45-
```sh
46-
git clone https://git.sr.ht/~reaper/commitlog
47-
# or
48-
git clone https://github.com/barelyhuman/commitlog
49-
50-
cd commitlog
51-
go build
52-
```
53-
54-
### With Tarballs
55-
56-
```sh
57-
tar -xvzf commitlog-<hash>.tar.gz
58-
cd commitlog
59-
go build
60-
```
61-
62-
```sh
63-
# to install it to go's bin folder and use the commitlog command during dev or as a perm install
64-
go install
65-
```
66-
67-
### Web Version
68-
69-
Source: [commitlog-web](https://github.com/barelyhuman/commitlog-web)
70-
71-
Web App: [commitlog-web](https://commitlog-web.herokuapp.com/)
72-
73-
## Usage
74-
75-
The usage is pretty simple, this cli tool assumes that you use [commitlint standards](https://github.com/conventional-changelog/commitlint#what-is-commitlint) 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.
76-
77-
**Simple Overview**
78-
`ci: <message>` - for ci/cd changes
79-
`feat|feature: <message>` - for feature changes
80-
`docs: <message>` - for documents or comment updations in code
81-
`refactor: <message>` - performance / code clean up changes or total BLOC changes
82-
`fix: <message>` - for fixes (self-explanatory)
83-
84-
### Supported Flags (as of v0.0.4-dev.3)
85-
86-
The below mentioned are the flags supported by the current branch and older tags might not support the flags
87-
or certain inputs in flags, use the `-h` flag to see what's supported on the version you are using.
88-
89-
```sh
90-
Usage of commitlog:
91-
-e string
92-
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
93-
to stop collecting commit message at
94-
-i string
95-
commit types to be includes (default "ci|refactor|docs|fix|feat|test|chore|other")
96-
-p string
97-
path to the repository, points to the current working directory by default (default ".")
98-
-promo
99-
if true will add a "generated by" promotional tag to the changelog (added in v1.0.0)
100-
-s string
101-
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
102-
to start collecting commit messages from
103-
-skip
104-
if true will skip trying to classify and just give a list of changes
105-
```
106-
107-
### Example Output (from this exact repository)
108-
109-
```sh
110-
> commitlog
111-
# which is the shorthand of
112-
> commitlog log -p .
113-
```
114-
115-
**As of 0.0.6 there's an experimental release subcommand that can be used for version tagging**
116-
117-
```markdown
118-
## Fixes
119-
120-
97c582b3eb5a6796ef9c250d9653ad90dce63cbe - example fix
121-
122-
## Other Changes
123-
124-
da6d837eb3134f836bfbe401de7882f2e0818ba8 - Create LICENSE
125-
b0f1b1d2bc4265cb72b70b3ae5b60f8e65f47b12 - initial commit
126-
```
127-
128-
## Subcommands
129-
130-
#### `release`
131-
132-
As of **0.0.7-dev.7** the cli comes with a sub command to maintain version for the repository.
133-
134-
The command will
135-
136-
- create the `.commitlog.release` file to handle and persit the version
137-
- handle the semver increments
138-
- create a new commit and tag for the same
139-
140-
```sh
141-
$ commitlog release -beta -beta-suffix dev
142-
Current Version:
143-
v0.0.7-dev.6
144-
New Version
145-
0.0.7-dev.7
146-
? Do you want me to create a commit for the new version?: Yes
147-
✔ Updated Version
148-
```
149-
150-
## Current Limitations
151-
152-
- 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)
153-
154-
## Contribution
155-
156-
[Contribution Guidelines](CONTRIBUTING.md)
28+
[MIT](/LICENSE)

docs/_sidebar.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- [Home](/)
2+
- [Install](/install)
3+
- [Quick Start](/quick-start)
4+
- [Usage](/usage)
5+
- [Selective Changelogs](/selective-changelogs)
6+
- [Version Management](/versioning)
7+
- [Manual](/manual)

docs/index.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<p align="center">
2+
<img src="https://raw.githubusercontent.com/barelyhuman/commitlog/main/assets/commitlog.png" height="64">
3+
<p align="center">Changelog generator using Commit History</p>
4+
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/barelyhuman/commitlog)](https://goreportcard.com/report/github.com/barelyhuman/commitlog)
6+
7+
## Philosophy
8+
9+
- Work on all major operating systems
10+
- Not platform dependent, not tied to Github, Gitlab, or anything. It's just markdown.
11+
- Ability to generate change logs between version tags
12+
- Handle release versioning of the project
13+
- Stay small
14+
15+
## Why
16+
17+
Every language has it's own isolated version of a tool like this, for someone who works with multiple languages, it's easier to
18+
have the same tool working everywhere, without having to setup something get it working. There's an even tighter scoped version of this, [nimclog](https://github.com/barelyhuman/nimclog).
19+
20+
The point of the tool is not to create super descriptive changelogs for you but to help your changelogs have enough information for you as a developer to be able to write proper changelogs while having references to the changes in one place.
21+
22+
## Documentation
23+
24+
The documentation can be read from the `docs` folder of the repository, or on the [website](https://barelyhuman.github.io/commitlog)
25+
26+
## License
27+
28+
[MIT](/LICENSE)

docs/install.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
### [commitlog](/)
2+
3+
# Install
4+
5+
## From goblin
6+
7+
Goblin will build the project for your specific system so it might take a bit of time based on the traffic
8+
9+
```sh
10+
curl -sf https://goblin.reaper.im/github.com/barelyhuman/commitlog
11+
```
12+
13+
## From Releases
14+
15+
To avoid the above work load you can download the binaries from the github releases pages
16+
[Commitlog Releases &rarr;](https://github.com/barelyhuman/commitlog/releases)
17+
18+
## From Source
19+
20+
If you have golang installed on your system you can build the binary on your system
21+
22+
```sh
23+
# clone the repository
24+
git clone https://github.com/barelyhuman/commitlog
25+
26+
# cd into the folder
27+
cd commitlog
28+
29+
# run go mod to download needed deps
30+
go mod tidy
31+
32+
# run go build and wait for it to complete
33+
go build
34+
35+
# if on unix, use the `install` command to install it onto a system used path
36+
install goblin /usr/local/bin
37+
# or if you need perms
38+
sudo install goblin /usr/local/bin
39+
```

docs/manual.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
### [commitlog](/)
2+
3+
## Manual
4+
5+
```
6+
$ commitlog <subcommand> [flags]
7+
```
8+
9+
### Subcommands
10+
11+
- `log`
12+
- `release` (added in v0.0.7-dev.7)
13+
14+
#### `commitlog log`
15+
16+
```sh
17+
eg:
18+
$ commitlog log -p .
19+
## or the shorthand
20+
$ commitlog
21+
```
22+
23+
```sh
24+
Usage of commitlog:
25+
-e string
26+
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
27+
to stop collecting commit message at
28+
-i string
29+
commit types to be includes (default "ci|refactor|docs|fix|feat|test|chore|other")
30+
-p string
31+
path to the repository, points to the current working directory by default (default ".")
32+
-promo
33+
if enabled will add a "generated by" promotional tag to the changelog
34+
-s string
35+
commit hash string / revision (ex. HEAD, HEAD^, HEAD~2)
36+
to start collecting commit messages from
37+
-skip
38+
if enabled will skip trying to classify and just give a list of changes
39+
```
40+
41+
<small>`-promo` (added in v1.0.0)</small>
42+
43+
#### `commitlog release`
44+
45+
```sh
46+
$ commitlog release [init | <flags>]
47+
```
48+
49+
```sh
50+
Usage of release:
51+
-beta
52+
If the release is a beta/prerelease
53+
-beta-suffix -beta.x
54+
If the release is a beta, to add/increment tag with -beta.x or mentioned string
55+
-major
56+
If release is a *major* one, will increment the x.0.0
57+
-minor
58+
If release is a *minor* one, will increment the 0.x.0
59+
-patch
60+
If release is a *patch*, will increment the 0.0.x
61+
```

docs/quick-start.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
### [commitlog](/)
2+
3+
# Quick Start
4+
5+
## Changelog
6+
7+
1. Install using one of the methods from [Installation Instructions](/install)
8+
2. Change terminal directory into the git repository you want the changelogs from.
9+
3. run the base command
10+
11+
```sh
12+
# on mac
13+
$ commitlog | pbcopy
14+
15+
# on linux with x11
16+
$ commitlog | xclip
17+
```
18+
19+
## Version Management
20+
21+
1. Install using one of the methods from [Installation Instructions](/install)
22+
2. Change terminal directory into the git repository you want the changelogs from.
23+
3. Initialise version management
24+
25+
```sh
26+
$ commitlog release init
27+
```
28+
29+
4. If working in an existing project, change the `.commitlog.release` file to match with the current version of the project.
30+
5. Run the needed command to increase versino
31+
```sh
32+
$ commitlog release
33+
```

0 commit comments

Comments
 (0)