Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lorislab/changelog

Changelog generator
https://github.com/lorislab/changelog

Last synced: about 2 months ago
JSON representation

Changelog generator

Awesome Lists containing this project

README

        

# changelog

Changelog generator

[![License](https://img.shields.io/github/license/lorislab/changelog?style=for-the-badge&logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/lorislab/changelog?logo=github&style=for-the-badge)](https://github.com/lorislab/changelog/releases/latest)

## Getting Started

Write changelog to the console for the `github` repository `lorislab/release-notes`
```shell script
changelog generate --repository lorislab/release-notes --token **** --version 2.0.0 --console
```
Create release and close version for the `github` repository `lorislab/release-notes`
```shell script
changelog generate --repository lorislab/release-notes --token **** --version 2.0.0 --create-release --close-version
```

If the tool is running in the GitHub it will also check these environment variables if they are not specified:
* GITHUB_REF - version paremeter
* GITHUB_REPOSITORY - repository parameter

## Commands

```shell script
❯ changelog generate --help
Generate change for the release

Usage:
changelog generate [flags]

Flags:
--close-version close version
--console write changelog to the console
--create-release create release and changelog
-f, --file string changelog definition (default "changelog.yaml")
-h, --help help for generate
-r, --repository string repository name (mandatory)
-t, --token string access token
-e, --version string release version (mandatory)

Global Flags:
--config string config file (default is $HOME/.changelog.yaml)
-v, --verbosity string Log level (debug, info, warn, error, fatal, panic (default "info")
```
Example of `changelog.yaml`
```yaml
sections:
- title: Major changes
labels:
- "release/super-fearure"
- title: Complete changelog
labels:
- "bug"
- "enhancement"
template: |
Maven dependency:

io.quarkus
quarkus-universe-bom
{{ .Version }}

{{ range $section := .Sections }}{{ if $section.Items }}### {{ $section.GetTitle }}{{ range $item := $section.Items }}
* [#{{ $item.GetID }}]({{ $item.GetURL }}) - {{ $item.GetTitle }}{{ end }}{{ end }}
{{ end }}
```

### Test release packages
```
goreleaser release --snapshot --clean
```