Skip to main content

cuenv_release/
lib.rs

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