Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,16 @@ repos:

- id: cargo-rustfmt
name: cargo-rustfmt
files: \.rs$
language: system
# Pinning to a specific rustc version, so that we get consistent formatting
entry: cargo +nightly-2025-05-26 fmt --all -- --check
stages: [pre-commit]
pass_filenames: false

- id: ./scripts/verify_release_notes
name: ./scripts/verify_release_notes
language: system
entry: ./scripts/verify_release_notes.sh
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
17 changes: 17 additions & 0 deletions scripts/verify_release_notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euo pipefail

STACKABLECTL_VERSION=$(grep 'version' "./rust/stackablectl/Cargo.toml" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)
[ -n "$STACKABLECTL_VERSION" ] || (
echo "CRATE_VERSION for is empty." >&2
echo "Please check ./rust/stackablectl/Cargo.toml" >&2
exit 1
)

RELEASE_NOTES_FILE="./docs/modules/stackablectl/partials/release-notes/release-${STACKABLECTL_VERSION}.adoc"

if [ ! -f "$RELEASE_NOTES_FILE" ]; then
echo "$RELEASE_NOTES_FILE does not exist, please create it and add the appropriate content" >&2
exit 1
fi
Loading