Skip to content

Commit

Permalink
Specify defaults in code rather than parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekitdev committed Jun 27, 2024
1 parent 84c66bc commit 0482228
Show file tree
Hide file tree
Showing 14 changed files with 174 additions and 209 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "changelogging"
version = "0.3.0"
version = "0.4.0"
authors = ["nekitdev <[email protected]>"]
edition = "2021"
description = "Building changelogs from fragments."
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The binaries can be downloaded from [releases][Releases].
### `pipx`

Note: because `changelogging` was originally written in python, releases on PyPI have
different versions: for instance, the `0.3.0` release is on PyPI with version `2.3.0`,
different versions: for instance, the `0.4.0` release is on PyPI with version `2.4.0`,
meaning the major part of the version is always incremented twice to get the PyPI one.

Installing `changelogging` with `pipx` is quite simple:
Expand Down Expand Up @@ -75,7 +75,7 @@ Create `changelogging.toml` and add the *name*, *version* and *URL* of the proje
```toml
[context]
name = "changelogging"
version = "0.3.0"
version = "0.4.0"
url = "https://github.com/nekitdev/changelogging"
```

Expand All @@ -96,7 +96,7 @@ And finally, preview the changelog entry!

```console
$ changelogging preview
## 0.3.0 (YYYY-MM-DD)
## 0.4.0 (YYYY-MM-DD)

### Features

Expand Down Expand Up @@ -131,7 +131,7 @@ $ cat CHANGELOG.md

<!-- changelogging: start -->

## 0.3.0 (YYYY-MM-DD)
## 0.4.0 (YYYY-MM-DD)

### Features

Expand Down
2 changes: 1 addition & 1 deletion changelogging.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[context]
name = "changelogging"
version = "0.3.0"
version = "0.4.0"
url = "https://github.com/nekitdev/changelogging"

[formats]
Expand Down
2 changes: 1 addition & 1 deletion examples/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- changelogging: start -->

## [0.3.0](https://github.com/nekitdev/changelogging/tree/v0.3.0) (YYYY-MM-DD)
## [0.4.0](https://github.com/nekitdev/changelogging/tree/v0.4.0) (YYYY-MM-DD)

### Features

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "changelogging"
version = "2.3.0"
version = "2.4.0"
description = "Building changelogs from fragments."
readme = "README.md"
requires-python = ">= 3.8"
Expand Down Expand Up @@ -36,5 +36,5 @@ bindings = "bin"
strip = true

[build-system]
requires = ["maturin >= 1.5.1"]
requires = ["maturin >= 1.6.0"]
build-backend = "maturin"
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl App {
preview.run(workspace).map_err(|error| Error::preview(error))?
},
Command::Create(create) => {
let directory = workspace.options.into_config().paths.directory;
let directory = workspace.config.paths.directory;

create
.run(directory)
Expand Down
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl<'b> Builder<'b> {
///
/// Returns [`InitError`] if initializing the renderer fails.
pub fn from_workspace(workspace: Workspace<'b>, date: Date) -> Result<Self, InitError> {
Self::new(workspace.context, workspace.options.into_config(), date)
Self::new(workspace.context, workspace.config, date)
}

/// Constructs [`Self`].
Expand Down
Loading

0 comments on commit 0482228

Please sign in to comment.