Skip to content

Commit

Permalink
fix: adapt to cargo-release 0.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
obreitwi committed May 27, 2024
1 parent 979d47a commit 335a58f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Changelog for [`asfa`](https://github.com/obreitwi/asfa)

## v0.9.2-pre (under development)
## Unreleased changes

* Disable unnecessary regex features to reduce binary size by ~20% (by @jirutka)
* Cosmetic: Ensure verification separator is at least ellipsis ("...").
Expand Down
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.

14 changes: 4 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "asfa"
version = "0.9.2-pre"
version = "0.9.1"
authors = ["Oliver Breitwieser <[email protected]>"]
edition = "2021"
description = "Avoid sending file attachments by uploading via SSH to a remote site with non-guessable (hash-based) prefix and print URLs."
Expand Down Expand Up @@ -50,15 +50,15 @@ targets = ["x86_64-unknown-linux-gnu"]
[package.metadata.release]
sign-commit = true
sign-tag = true
dev-version-ext = "pre"
# dev-version-ext = "pre"
push-remote = "[email protected]:obreitwi/asfa.git"
tag-message = "Release: v{{version}}"
pre-release-commit-message = "Release: v{{version}}"
post-release-commit-message = "Development iteration: v{{next_version}}"
# post-release-commit-message = "Development iteration: v{{next_version}}"

[[package.metadata.release.pre-release-replacements]]
file="CHANGELOG.md"
search="(?m)^## v[0-9]+\\.[0-9]+\\.[0-9]+-pre \\(under development\\)$"
search="^## Unreleased changes$"
replace="## v{{version}} ({{date}})"
exactly = 1

Expand All @@ -67,9 +67,3 @@ file="README.md"
search="https://img\\.shields\\.io/github/commits-since/obreitwi/asfa/v[0-9]+\\.[0-9]+\\.[0-9]+"
replace="https://img.shields.io/github/commits-since/obreitwi/asfa/v{{version}}"
exactly = 1

[[package.metadata.release.post-release-replacements]]
file = "CHANGELOG.md"
search = "(?m)(?P<header>^# .*)$"
replace = "$header\n\n## v{{next_version}} (under development)"
exactly = 1
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
gawk
gh
ghp-import
gnused
help2man
# pkgs.ripgrep
];
Expand Down
13 changes: 13 additions & 0 deletions tools/commit-post-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

toplevel="$(git rev-parse --show-toplevel)"

changelog="${toplevel}/CHANGELOG.md"

sed -i -e '4i ## Unreleased changes' "${changelog}"
sed -i -e '4G' "${changelog}"

git add "${changelog}"
git commit -m "doc: add 'unreleased' section in changelog"
1 change: 1 addition & 0 deletions tools/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ cd "${toplevel}"
cargo release "${@}"
"${toplevel}/tools/update-docs-latest-release.sh"
"${toplevel}/tools/make-binary-release.sh"
"${toplevel}/tools/commit-post-release.sh"

0 comments on commit 335a58f

Please sign in to comment.