Skip to content
Snippets Groups Projects
Commit 3b96137e authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

docs(README): Update the README with new features

parent 46679bc7
No related branches found
No related tags found
No related merge requests found
Pipeline #111 skipped
# shift
# shift [![pipeline status](https://gitlab.chromabits.com/etcinit/shift/badges/master/pipeline.svg)](https://gitlab.chromabits.com/etcinit/shift/-/commits/master)
A changelog generator
A changelog generator.
## Usage
## Overview
`shift` is a Haskell library and executable that allow you to generate a changelog by inspecting the history of a Git repository.
This project is somewhat a prototype, and mainly works if the repository being used meets the following criteria:
This project is currently a prototype, and mainly works if you project meets
the following criteria:
- It's Git.
- Commits follow the [Conventional Commits](https://www.conventionalcommits.org) spec or the [Angular Commit Convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format).
- Version tags (vX.X.X.X, vX.X.X, and others).
- It's hosted on a GitLab instance or GitHub, if links to commits and authors are desired.
- It is on Git.
- Commits follow the Angular commit convention.
- Numeric tags (vX.X.X.X, vX.X.X, and others).
- For URLs to authors and commits, it will need to be hosted on GitHub.
The `shift` executable generates changelogs in Markdown. However, the underlying data structure can be accessed on the library version for custom processing.
If it does, you can build and install this project using Stack:
## Installing
You can build and install this project using Stack:
```
stack build --copy-bins
```
## Usage
Once `shift`, is in your `PATH`, you can invoke it according to where your
repository is hosted:
- **GitLab:**
```
shift generate -t gitlab --gitlab-token XXX --gitlab-owner etcinit --gitlab-repository shift --gitlab-server https://gitlab.chromabits.com
```
- **GitHub:**
```
shift generate -t github --github-token XXX --github-owner etcinit --github-repository shift
```
- **Local/Other:**
```
shift generate -t git
```
To generate a `CHANGELOG` file, use: `shift -t git generate --output-path CHANGELOG`.
### Options
| Name | Description | Example |
| --- | --- | --- |
| `--output-path` | Writes the generated chagelog to the specified path. Note: The path will be overwritten one every run. | - |
| `--include-head` | Whether to include `HEAD` as a version in the changelog. Useful for tracking changes for the next tag. | - |
| `--from-ref` | The starting point of the changelog. If `--to-ref` is also specified, the changelog will be generated from the diff between these two refs. | `v1.0.1` |
| `--to-ref` | The end point of the changelog. If `--from-ref` is also specified, the changelog will be generated from the diff between these two refs. | `v1.0.1` |
### Built-in Server
`shift` also has a built-in web server for quickly previewing changes. Every refresh causes the changelog to be regenerated.
```
shift generate -t github --github-token XXX --github-owner etcinit --github-repository shift
shift serve -t git
```
- **Local/Other:** `shift generate -t git`.
To save to a `CHANGELOG.md` file: `shift generate -t git > CHANGELOG.md`.
Navigate to http://localhost:3000 to view the changelog.
## TODO
By default, it will be rendered to HTML. A `as_markdown=true` query string param can be specified to view the changelog as Markdown: http://localhost:3000?as_markdown=true
A lot.
#### Options
- Other hosting types: Phabricator, BitBucket.
- Support more commit conventions.
- Templates.
- Releases.
| Name | Description | Example |
| --- | --- | --- |
| `--port` | The port to start the HTTP listener in. Defaults to `3000` if not provided. | `4000` |
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment