1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use thiserror::Error;
#[non_exhaustive]
#[derive(Error, Debug)]
pub enum Error {
#[error("Version tags must start with the letter 'v' but tag is {0}")]
NotVersionTag(String),
#[error("Version must have three components but at least {0} were found")]
TooManyComponents(usize),
#[error("Version must have three components but only {0} found")]
NotEnoughComponents(usize),
#[error("Version must be a number but found {0}")]
MustBeNumber(String),
#[error("No valid version tag found in the repository")]
NoVersionTag,
#[error("First production release already deployed. Current major version: {0}")]
MajorAlreadyUsed(String),
#[error("No conventional commits found")]
NoConventionalCommits,
#[error("No conventional commits requiring a version level change")]
NoLevelChange,
#[error("0:?")]
Git2(#[from] git2::Error),
}