From 0f6f7f318f3b5fefedcede670e75b31e855ea82a Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Tue, 24 May 2022 09:58:03 +0800 Subject: [PATCH 1/5] chore: bump development version to 0.0.4 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7c258a3..a4396d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rrclone" -version = "0.0.3" +version = "0.0.4" authors = ["Vehbi Sinan Tunalioglu "] edition = "2018" From 5773ec3bfed9064150e4700931f4aec40af04b5a Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Wed, 25 May 2022 11:58:53 +0800 Subject: [PATCH 2/5] feat: create empty source directories on destination Closes #11. --- src/rclone.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rclone.rs b/src/rclone.rs index 8aebe57..4c5fb26 100644 --- a/src/rclone.rs +++ b/src/rclone.rs @@ -51,6 +51,7 @@ pub fn task_to_args(task: &config::Task) -> Vec { "--stats".to_string(), "10000m".to_string(), "sync".to_string(), + "--create-empty-src-dirs".to_string(), "--delete-excluded".to_string(), format!( "{}{}", From 937cc12c8bcb5fe313ca73839eae8731158d9a75 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Wed, 25 May 2022 12:07:26 +0800 Subject: [PATCH 3/5] chore(build): update Cargo.lock --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index fa9fd1e..41a1711 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,7 +78,7 @@ dependencies = [ [[package]] name = "rrclone" -version = "0.0.3" +version = "0.0.4" dependencies = [ "chrono", "serde", From c571302577d1b9763558f2e1945faf02f0ca1022 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Wed, 25 May 2022 12:12:55 +0800 Subject: [PATCH 4/5] chore(docs): add instruction to update Cargo.lock post-version bump --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 0d86ad8..cbd1237 100644 --- a/README.md +++ b/README.md @@ -121,11 +121,7 @@ git checkout develop git rebase main ``` -Bump development version, commit and push: - -```sh -git push -``` +Bump development version, run `cargo build` to update `Cargo.lock`, commit and `git push`. ## License From bb81faadbb1410ad4446d3a70feac412f92a7985 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Wed, 25 May 2022 12:25:51 +0800 Subject: [PATCH 5/5] chore(dev): integrate git-chglog --- .chglog/CHANGELOG.tpl.md | 56 +++++++++++++++++++++++++++++++++++ .chglog/config.yml | 28 ++++++++++++++++++ CHANGELOG.md | 63 +++++++++++++++++++++++++++++++++------- README.md | 28 +++++++++++++----- shell.nix | 1 + 5 files changed, 159 insertions(+), 17 deletions(-) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..5683d03 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,56 @@ +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ 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 -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..3202ac3 --- /dev/null +++ b/.chglog/config.yml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a3b07db..532138a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,63 @@ -# CHANGELOG + +## [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)) + +## [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)) + +## [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 + + + +## 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 diff --git a/README.md b/README.md index cbd1237..a71756d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -56,8 +62,8 @@ 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`): @@ -65,6 +71,12 @@ Set the release tag (example is `0.0.2`): export RELTAG="0.0.2" ``` +Update the `CHANGELOG.md` by running: + +```sh +git-chglog --output CHANGELOG.md --next-tag "${RELTAG}" +``` + Commit changes: ```sh @@ -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 @@ -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 diff --git a/shell.nix b/shell.nix index 7c2463b..df177aa 100644 --- a/shell.nix +++ b/shell.nix @@ -7,5 +7,6 @@ pkgs.mkShell { buildInputs = [ pkgs.cargo pkgs.rustc + pkgs.git-chglog ]; }