Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
  • Loading branch information
simonsan committed Sep 18, 2023
1 parent 4b67697 commit 48d99c5
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 15 deletions.
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.1.1] - 2023-09-18

### Bug Fixes

- Correct glob-matching for relative paths
([#783](https://github.com/rustic-rs/rustic/issues/783))

### Documentation

- Update Readme layout, move docs to separate repository, add rustic_core
Readme.md ([#820](https://github.com/rustic-rs/rustic/issues/820))
- Add rustic_core logo
- Set subtitle for rustic_core readme
- Fix item links in documentation for rustic_core
- Pass "--document-private-items" to rustdoc via metadata in manifest

### Features

- Option to disable requiring git repository for git-ignore rules
- Wait for password-command to exit
- Add `--json` option to `forget` command
([#806](https://github.com/rustic-rs/rustic/issues/806))

### Miscellaneous Tasks

- Lint markdown with dprint, run initial dprint fmt
([#830](https://github.com/rustic-rs/rustic/issues/830))
- Lint has been removed
- Add cliff.toml and generate rustic_core changelog
- Add documentation field to rustic_core manifest
- Relink to new image location

### Refactor

- Replace `nom` with `shellwords` to split strings
([#752](https://github.com/rustic-rs/rustic/issues/752))
- Add metadata to crate manifests
([#822](https://github.com/rustic-rs/rustic/issues/822))

### Build

- Bump public-api from 0.29.1 to 0.31.2
([#695](https://github.com/rustic-rs/rustic/issues/695))
- Bump public-api from 0.31.2 to 0.31.3
([#796](https://github.com/rustic-rs/rustic/issues/796))
- Bump rustdoc-json from 0.8.6 to 0.8.7
([#794](https://github.com/rustic-rs/rustic/issues/794))

### Prune

- Add example using rustic_core
- Don't abort if time is unset for pack-to-delete

### Repoinfo

- Add options --json, --only-files, --only-index

### Rest/rclone

- Make # of retries cusomizable and use sensible default

### Restore

- Download multiple contiguous blobs in one request

### Rustic_core

- Add NoProgress and NoProgressBars (e.g. for examples)
- Prepare v0.1.1

## [0.1.0] - 2023-08-11

- Initial refactoring out of rustic_core from rustic-rs

<!-- generated by git-cliff -->
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustic_core"
version = "0.1.0"
version = "0.1.1"
authors = ["Alexander Weiss"]
categories = [
"Algorithms",
Expand All @@ -16,13 +16,13 @@ homepage = "https://rustic.cli.rs/"
include = ["src/**/*", "LICENSE-*", "README.md", "examples/**/*"]
keywords = ["backup", "restic", "deduplication", "encryption", "library"]
license = "Apache-2.0 OR MIT"
publish = false # Don't publish until we fix/stabilize public api!!!
publish = true
readme = "README.md"
repository = "https://github.com/rustic-rs/rustic_core"
resolver = "2"
rust-version = "1.66.1"
description = """
rustic_core - fast, encrypted, deduplicated backups that power rustic-rs
rustic_core - library for fast, encrypted, deduplicated backups that powers rustic-rs
"""

[lib]
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p align="center">
<a href="https://crates.io/crates/rustic_core"><img src="https://img.shields.io/crates/v/rustic_core.svg" /></a>
<a href="https://docs.rs/rustic_core/"><img src="https://img.shields.io/docsrs/rustic_core?style=flat&amp;labelColor=1c1d42&amp;color=4f396a&amp;logo=Rust&amp;logoColor=white" /></a>
<a href="https://github.com/rustic-rs/rustic/blob/main/crates/rustic_core/"><img src="https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg" /></a>
<a href="https://github.com/rustic-rs/rustic_core/blob/main/"><img src="https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg" /></a>
<a href="https://crates.io/crates/rustic_core"><img src="https://img.shields.io/crates/d/rustic_core.svg" /></a>
<p>

Expand All @@ -16,6 +16,11 @@ backup tool that provides fast, encrypted, deduplicated backups. It reads and
writes the `restic` repository format, which is described in their design
document.

**Note**: `rustic_core` is in an early development stage and its API is subject
to change in the next releases. If you want to give feedback on that, please
open a thread in our
[discussions](https://github.com/rustic-rs/rustic/discussions).

## Contact

You can ask questions in the
Expand All @@ -24,7 +29,7 @@ the [FAQ](https://rustic.cli.rs/docs/FAQ.html).

| Contact | Where? |
| ------------- | --------------------------------------------------------------------------------------------------------------- |
| Issue Tracker | [GitHub Issues](https://github.com/rustic-rs/rustic/issues) |
| Issue Tracker | [GitHub Issues](https://github.com/rustic-rs/rustic_core/issues/choose) |
| Discord | [![Discord](https://dcbadge.vercel.app/api/server/WRUWENZnzQ?style=flat-square)](https://discord.gg/WRUWENZnzQ) |
| Discussions | [GitHub Discussions](https://github.com/rustic-rs/rustic/discussions) |

Expand Down Expand Up @@ -169,6 +174,18 @@ fn main() -> Result<(), Box<dyn Error>> {
}
```

## Contributing

Found a bug?
[Open an issue!](https://github.com/rustic-rs/rustic_core/issues/choose)

Got an idea for an improvement? Don't keep it to yourself!

- Contribute fixes or new features via a pull requests!

Please make sure, that you read the
[contribution guide](https://rustic.cli.rs/docs/contributing-to-rustic.html).

## Minimum Rust version policy

This crate's minimum supported `rustc` version is `1.66.1`.
Expand Down
82 changes: 82 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.

[changelog]
# changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://tera.netlify.app/docs
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# postprocessors
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/rustic-rs/rustic" },
]
[git]
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" }, # replace issue numbers
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^style", group = "Styling", skip = true }, # we ignore styling in the changelog
{ message = "^test", group = "Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|ci", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "Security" },
{ message = "^revert", group = "Revert" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
# limit the number of commits included in the changelog.
# limit_commits = 42
2 changes: 1 addition & 1 deletion docs/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Documentation

Our documentation can be found at: <https://rustic.cli.rs/docs>
Our documentation can be found at: <https://rustic.cli.rs/dev-docs>
26 changes: 18 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ A library for deduplicated and encrypted backups, using repositories as specifie
This section gives a brief overview of the primary types in this crate:
TODO
The main type is the [`Repository`] type which describes a way to access a repository.
It can be in different states and allows - depending on the state - various high-level
actions to be performed on the repository like listing snapshots, backing up or restoring.
Besides this, various `*Option` types exist which allow to specify options for accessing a
[`Repository`] or for the methods used within a [`Repository`]. Those types usually offer
setter methods as well as implement [`serde::Serialize`] and [`serde::Deserialize`].
Other main types are typically result types obtained by [`Repository`] methods which sometimes
are also needed as input for other [`Repository`] method, like computing a [`PrunePlan`] and
performing it.
There are also lower level data types which represent the stored repository format or
help accessing/writing it. Those are collected in the [`repofile`] module. These types typically
implement [`serde::Serialize`] and [`serde::Deserialize`].
# Example - initialize a repository, backup to it and get snapshots
Expand Down Expand Up @@ -53,23 +67,19 @@ TODO
assert_eq!(snaps[0], snap);
```
# Lower level APIs
TODO
# Crate features
This crate exposes a few features for controlling dependency usage.
* **clap** -
Enables a dependency on the `clap` and `clap_complete` crate and enables
parsing from the commandline. This feature is disabled by default.
* **cli** -
Enables support for CLI features by enabling `merg` and `clap` features.
* **merge** -
Enables support for merging multiple values into one, which enables the `merge`
dependency. This is needed for parsing commandline arguments and merging them
into one (e.g. config). This feature is disabled by default.
* **clap** -
Enables a dependency on the `clap` and `clap_complete` crate and enables
parsing from the commandline. This feature is disabled by default.
*/

#![allow(dead_code)]
Expand Down

0 comments on commit 48d99c5

Please sign in to comment.