Skip to content

Commit 4cfbb43

Browse files
docs: Documentation and License.
Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
1 parent 06751d6 commit 4cfbb43

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Jitesoft AB
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# CC-GEN
2+
3+
A generator of changelog from conventional commits.
4+
5+
## Work in progress
6+
7+
This program is a work in progress, some features works basically as intended,
8+
but more should be added and the code is quite messy.
9+
Use at your own risk!
10+
11+
## Why?
12+
13+
There are a lot of changelog generators out there, the reason for this one is
14+
that the ones already existing either did not work with lightweight tags
15+
or required a lot of extra things installed to work.
16+
The idea of cc-gen is to have a simple single binary which is easy to
17+
run and easy to modify both in form of code and the templates/configuration
18+
which is used to generate output.
19+
20+
## How?
21+
22+
There are currently two commands, `init` and `generate|gen`.
23+
The former creates a configuration file locally or globally which allows
24+
you to change the templates used to generate the changelogs.
25+
The later will generate a changelog.
26+
27+
### Init
28+
29+
The init command can be invoked with a --global flag, in which case it will
30+
create a .cc-gen file in your home directory with the default configuration.
31+
32+
Without the --global flag, the file will be created in the directory where
33+
the command was invoked.
34+
35+
The following configuration values are available:
36+
37+
`Header` - The header of the changelog, defaults to '# Change Log'
38+
`GroupBreakingChanges` - If any breaking changes should have their own section
39+
in the changelog, defaults to true.
40+
`GroupBreakingHeader` - Header for breaking changes, defautls to '## Breaking changes'
41+
`Type` - Template for 'Types'
42+
`DefaultType` - Type any non-matched commits will go under (commits following cc but not found in TypeMap)
43+
`TypeMap` - A map of 'types' and their possible values in the commit messages
44+
`BreakingCommit` - Template for breaking changes, only used if 'GroupBreakingChanges' is false
45+
`Commit` - Template for commits
46+
47+
48+
```text
49+
Default for 'Commit':
50+
* [ {{ commit.sha | string.slice1 0 6 }} ] {{ header }} ({{ commit.committer.name }}) {{ commit.committer.when }}
51+
52+
Default for 'BreakingCommit'
53+
* [ {{ commit.sha | string.slice1 0 6 }} ] **breaking** {{ header }} ({{ commit.committer.name }}) {{ commit.committer.when }}
54+
```
55+
56+
_Will later fill this part with a bit more information on what is passed to the template engine,
57+
for now, check the 'Conventional.cs' class_
58+
59+
## With what?
60+
61+
The application makes use of [LibGit2Sharp](https://github.com/libgit2/libgit2sharp/) to
62+
work with the git log and [Scriban](https://github.com/scriban/scriban) to handle the templates.
63+
The command line helper used is [System.CommandLine](https://github.com/dotnet/command-line-api)
64+
and tests makes use of [XUnit](https://xunit.net/) and [Moq](https://github.com/moq/moq)

cc-gen.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cc-gen", "cc-gen\cc-gen.csp
44
EndProject
55
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cc-gen.tests", "cc-gen.tests\cc-gen.tests.csproj", "{78E23272-05CB-4FCD-9AE8-CFD158FF73A5}"
66
EndProject
7+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{7E30A818-2618-4AB0-ABFB-C070E6138FDD}"
8+
ProjectSection(SolutionItems) = preProject
9+
.gitignore = .gitignore
10+
cc-gen.sln = cc-gen.sln
11+
README.md = README.md
12+
LICENSE = LICENSE
13+
EndProjectSection
14+
EndProject
715
Global
816
GlobalSection(SolutionConfigurationPlatforms) = preSolution
917
Debug|Any CPU = Debug|Any CPU

0 commit comments

Comments
 (0)