diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-28 13:19:02 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-28 16:26:45 +0300 |
commit | c444c915fc349ee345080aa4d151f9416b5c0ab8 (patch) | |
tree | ea41a40f3e29db50758d1f9d3744b7b78702743b /src/errors.rs | |
parent | 81fa9799b1393f427e4095978285cabbaa809735 (diff) | |
download | bumper-rs-c444c915fc349ee345080aa4d151f9416b5c0ab8.tar.gz |
feat: create git tag for release
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs new file mode 100644 index 0000000..607eecb --- /dev/null +++ b/src/errors.rs @@ -0,0 +1,15 @@ +#[derive(Debug, thiserror::Error)] +pub enum BumperError { + #[error("Failed to run git: {0}")] + GitInvoke(#[source] std::io::Error), + + #[error("Command 'git tag' failed: {0}")] + GitTag(String), +} + +impl BumperError { + pub fn git_tag(stderr: &[u8]) -> Self { + let stderr = String::from_utf8_lossy(stderr).into_owned(); + Self::GitTag(stderr) + } +} |