1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ReleaseError {
5 #[error("no commits found since last release")]
6 NoCommits,
7
8 #[error("no releasable commits found (no feat/fix/breaking changes)")]
9 NoBump,
10
11 #[error("configuration error: {0}")]
12 Config(String),
13
14 #[error("git error: {0}")]
15 Git(String),
16
17 #[error("vcs provider error: {0}")]
18 Vcs(String),
19
20 #[error("hook failed: {command}")]
21 Hook { command: String },
22
23 #[error("changelog error: {0}")]
24 Changelog(String),
25
26 #[error("version file error: {0}")]
27 VersionBump(String),
28
29 #[error(transparent)]
30 Other(#[from] anyhow::Error),
31}
32
33pub use anyhow;