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