cuenv_release/
lib.rs

1//! Native release management for cuenv.
2//!
3//! This crate provides a comprehensive release management subsystem within cuenv,
4//! handling versioning, changelogs, and publishing. It replaces external tools like
5//! `changesets` or `sampo` by integrating these workflows directly into cuenv's
6//! hermetic environment and task graph.
7//!
8//! # Features
9//!
10//! - **Changeset Workflow**: Centralized changeset storage in `.cuenv/changesets/`
11//! - **Monorepo Awareness**: Leverages cuenv's workspace graph for dependency propagation
12//! - **Version Calculation**: Semantic versioning with fixed and linked package groups
13//! - **Changelog Generation**: Automated changelog updates per package and workspace
14//! - **Topological Publishing**: Publishes packages in dependency order
15//!
16//! # Architecture
17//!
18//! The crate is organized around several core modules:
19//!
20//! - [`changeset`] - Changeset creation, parsing, and storage
21//! - [`version`] - Version calculation and bumping logic
22//! - [`changelog`] - Changelog generation and formatting
23//! - [`config`] - Release configuration types
24//! - [`publish`] - Publishing workflow and topological ordering
25//!
26//! # Example
27//!
28//! ```rust,ignore
29//! use cuenv_release::{Changeset, ChangesetManager, BumpType};
30//! use std::path::Path;
31//!
32//! // Create a new changeset
33//! let changeset = Changeset::new(
34//!     "Add new feature",
35//!     vec![("cuenv-core".to_string(), BumpType::Minor)],
36//!     Some("This adds a cool new feature".to_string()),
37//! );
38//!
39//! // Store it
40//! let manager = ChangesetManager::new(Path::new("."));
41//! manager.add(&changeset)?;
42//! ```
43
44#![warn(missing_docs)]
45#![warn(clippy::all, clippy::pedantic)]
46
47pub mod changelog;
48pub mod changeset;
49pub mod config;
50pub mod conventional;
51pub mod error;
52pub mod manifest;
53pub mod publish;
54pub mod version;
55
56// Re-export main types
57pub use changelog::{ChangelogEntry, ChangelogGenerator};
58pub use changeset::{BumpType, Changeset, ChangesetManager, PackageChange};
59pub use config::{ChangelogConfig, ReleaseConfig, ReleaseGitConfig, ReleasePackagesConfig};
60pub use conventional::{CommitParser, ConventionalCommit};
61pub use error::{Error, Result};
62pub use manifest::CargoManifest;
63pub use publish::{PublishPackage, PublishPlan};
64pub use version::{Version, VersionCalculator};