diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-13 10:46:37 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-13 11:30:12 +0300 |
commit | ecdbc0b100cc50adffb1262ab485837d5dd2f709 (patch) | |
tree | f24f0c74a0ba8e5b85ab2e46f009e9ff4be9a66f /src/project.rs | |
parent | a7cbaaa9be2dfc5e4fcdaf342dba98c923a99ab4 (diff) | |
download | bumper-rs-ecdbc0b100cc50adffb1262ab485837d5dd2f709.tar.gz |
feat: support Python projects
Diffstat (limited to 'src/project.rs')
-rw-r--r-- | src/project.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/project.rs b/src/project.rs index 9f45363..e67fefc 100644 --- a/src/project.rs +++ b/src/project.rs @@ -1,11 +1,13 @@ use crate::debian::Debian; use crate::errors::BumperError; +use crate::python::Python; use crate::rust::Rust; use std::path::Path; pub enum ProjectKind { Rust(Rust), Debian(Debian), + Python(Python), } impl ProjectKind { @@ -21,6 +23,10 @@ impl ProjectKind { kinds.push(ProjectKind::Debian(p)); } + if let Ok(p) = Python::new(dirname) { + kinds.push(ProjectKind::Python(p)); + } + if kinds.is_empty() { Err(BumperError::UnknownProjectKind(dirname.to_path_buf())) } else { @@ -32,6 +38,7 @@ impl ProjectKind { match self { Self::Rust(ref mut rust) => rust.set_version(version)?, Self::Debian(ref mut debian) => debian.set_version(version)?, + Self::Python(ref mut python) => python.set_version(version)?, } Ok(()) } |