Skip to content

Commit

Permalink
chore: add dev tooling
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Sep 14, 2023
1 parent 47ad2f3 commit 07ea986
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
github-ref: ${{ github.ref }}
sign-release: true
hash-release: true
use-project-version: false # not being used in rustic_server
use-project-version: false # not being used in rustic_scheduler
#
# TODO!: add publishing to release draft
# TODO!: include changelog in release draft
Expand Down
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
stages: [commit]
- id: check-json
stages: [commit]
- id: check-toml
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: detect-private-key
stages: [commit]
- repo: https://github.com/crate-ci/typos
rev: v1.16.3
hooks:
- id: typos
stages: [commit]
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
hooks:
- id: committed
stages: [commit-msg]
20 changes: 20 additions & 0 deletions committed.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
subject_length = 50
subject_capitalized = false
subject_not_punctuated = true
imperative_subject = true
no_fixup = true
no_wip = true
hard_line_length = 0
line_length = 80
style = "none"
allowed_types = [
"fix",
"feat",
"chore",
"docs",
"style",
"refactor",
"perf",
"test",
]
merge_commit = true
9 changes: 9 additions & 0 deletions release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pre-release-hook = ["git-cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}"]

pre-release-replacements = [
{ file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}" },
{ file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}", exactly = 1 },
{ file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}" },
{ file = "CHANGELOG.md", search = "<!-- next-header -->", replace = "<!-- next-header -->\n\n## [Unreleased] - ReleaseDate", exactly = 1 },
{ file = "CHANGELOG.md", search = "<!-- next-url -->", replace = "<!-- next-url -->\n[Unreleased]: https://github.com/rustic-rs/rustic_scheduler/compare/{{tag_name}}...HEAD", exactly = 1 },
]
2 changes: 1 addition & 1 deletion src/bin/rustic-scheduler-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async fn main() {
Some(res) = rx.recv() => {
match res {
NotifyMessage::BackupResult{client, msg:BackupResultMessage::Ok {snapshot} } => {
println!("backup to {client}, {} finished successfuly. Got snapshot {}", snapshot.paths, snapshot.id);
println!("backup to {client}, {} finished successfully. Got snapshot {}", snapshot.paths, snapshot.id);
clients.finish_process(client, Local::now(), SourceBackupStatus::Ok(snapshot.id));
}
NotifyMessage::BackupResult{client, msg:BackupResultMessage::Error {message} } => {
Expand Down

0 comments on commit 07ea986

Please sign in to comment.