diff options
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(()) } |