Skip to main content

base_project/
lib.rs

1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4//! Shared Base Rust project conventions and development tasks.
5//!
6//! Add this crate to a private `bake/` package to link the standard project
7//! tasks and their published agent context into a repository.
8use bake::{Context, Result};
9use bake_agent_context as _;
10use bake_cargo as _;
11use bake_license as _;
12use bake_markdown as _;
13use bake_readme as _;
14use bake_releases as _;
15use bake_test as _;
16
17mod markdown;
18
19/// Refresh the standard project files after a Cargo version bump.
20#[bake::task(name = "cargo:after_version_bump")]
21pub fn after_version_bump(context: &mut Context, version: String) -> Result<()> {
22    let tag = bake_cargo::release_tag(context, &version)?;
23    context.call("license:update", &[])?;
24    context.call("releases:update", &[&tag])?;
25    context.call("readme:update", &[])?;
26    markdown::normalize(context)?;
27    Ok(())
28}
29
30#[cfg(test)]
31#[path = "tests.rs"]
32mod tests;