Skip to content

Commit

Permalink
Merge pull request #13 from telostat/vst/git-chglog
Browse files Browse the repository at this point in the history
Integrate git-chglog
  • Loading branch information
vst authored May 25, 2022
2 parents 0127843 + bb81faa commit df8b1b2
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 17 deletions.
56 changes: 56 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
28 changes: 28 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/telostat/rrclone
options:
commits:
# filters:
# Type:
# - feat
# - fix
# - perf
# - refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
63 changes: 53 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,63 @@
# CHANGELOG
<a name="unreleased"></a>
## [Unreleased]

### [0.0.3](https://github.com/telostat/rrclone/compare/0.0.2...0.0.3) (2022-05-24)
### Chore
- bump development version to 0.0.4
- **build:** update Cargo.lock
- **docs:** add instruction to update Cargo.lock post-version bump

### Feat
- create empty source directories on destination

### Features

* **build:** add build artifact for Nix ([ac85517](https://github.com/telostat/rrclone/commit/ac855173972129690581cdf3efb49ee8966870b1))
* delete excluded files from destination ([4ac77a2](https://github.com/telostat/rrclone/commit/4ac77a2a16efaebdd36518c99c9d2cc14ba334d5))
<a name="0.0.3"></a>
## [0.0.3] - 2022-05-24
### Chore
- bump development version to 0.0.3
- **build:** commit Cargo.lock
- **dev:** add Nix shell for local compilation
- **docs:** add release badge
- **docs:** add installation instructions and commands
- **docs:** document release process
- **release:** 0.0.3

### [0.0.2](https://github.com/telostat/rrclone/compare/0.0.1...0.0.2) (2022-04-18)
### Feat
- delete excluded files from destination
- **build:** add build artifact for Nix

### Pull Requests
- Merge pull request [#10](https://github.com/telostat/rrclone/issues/10) from telostat/vst/issue-9
- Merge pull request [#8](https://github.com/telostat/rrclone/issues/8) from telostat/nixify
- Merge pull request [#7](https://github.com/telostat/rrclone/issues/7) from telostat/cargo-lock
- Merge pull request [#6](https://github.com/telostat/rrclone/issues/6) from telostat/vst/documentation

### Features

* make rrclone configuration self-sufficient ([70ae382](https://github.com/telostat/rrclone/commit/70ae382af8d7e264f1c893a53bbabe8589fd187e))
<a name="0.0.2"></a>
## [0.0.2] - 2022-04-18
### Chore
- bump development version to 0.0.2
- **docs:** add instructions for cross-compilation
- **release:** 0.0.2

### 0.0.1 (2021-01-04)
### Feat
- make rrclone configuration self-sufficient

Initial release.
### Pull Requests
- Merge pull request [#4](https://github.com/telostat/rrclone/issues/4) from telostat/vst/refactor
- Merge pull request [#3](https://github.com/telostat/rrclone/issues/3) from telostat/vst/cross-compilation-instructions
- Merge pull request [#2](https://github.com/telostat/rrclone/issues/2) from telostat/alioguzhan-patch-1


<a name="0.0.1"></a>
## 0.0.1 - 2021-01-04
### Chore
- initial code commit
- **release:** 0.0.1

### Pull Requests
- Merge pull request [#1](https://github.com/telostat/rrclone/issues/1) from telostat/init


[Unreleased]: https://github.com/telostat/rrclone/compare/0.0.3...HEAD
[0.0.3]: https://github.com/telostat/rrclone/compare/0.0.2...0.0.3
[0.0.2]: https://github.com/telostat/rrclone/compare/0.0.1...0.0.2
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
> **TODO:** Provide full README.
>
> **NOTE:** This is a work-in-progress application with a very limited
> functionality. Expect breaking changes and improved functionality as we move
> on.
> functionality. Expect breaking changes and improved functionality as
> we move on.
## Installation

Expand Down Expand Up @@ -43,6 +43,12 @@ sudo install /tmp/rrclone /usr/local/bin

## Releasing

Enter Nix shell:

```sh
nix-shell
```

Install [cross](https://github.com/cross-rs/cross):

```sh
Expand All @@ -56,15 +62,21 @@ git checkout main
git merge --no-ff develop
```

Update the version information in `Cargo.toml` if required. Update the
`CHANGELOG.md` as well (currently using `standard-version`).
Update the version information in `Cargo.toml` if required and run
`cargo build` to update `Cargo.lock`.

Set the release tag (example is `0.0.2`):

```sh
export RELTAG="0.0.2"
```

Update the `CHANGELOG.md` by running:

```sh
git-chglog --output CHANGELOG.md --next-tag "${RELTAG}"
```

Commit changes:

```sh
Expand All @@ -89,8 +101,9 @@ Create a new GitHub release:
gh release create "${RELTAG}" --generate-notes --title "v${RELTAG}" --draft
```

Build on your own architecture and upload to the release(hoping that it is Linux
x86_64, otherwise must add this to cross build instructions, too):
Build on your own architecture and upload to the release(hoping that
it is Linux x86_64, otherwise must add this to cross build
instructions, too):

```sh
cargo build --release
Expand Down Expand Up @@ -121,7 +134,8 @@ git checkout develop
git rebase main
```

Bump development version, run `cargo build` to update `Cargo.lock`, commit and `git push`.
Bump development version, run `cargo build` to update `Cargo.lock`,
commit and `git push`.

## License

Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ pkgs.mkShell {
buildInputs = [
pkgs.cargo
pkgs.rustc
pkgs.git-chglog
];
}

0 comments on commit df8b1b2

Please sign in to comment.