diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-13 08:39:17 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-13 08:39:17 +0000 |
commit | 50258196ee8832ca8d9f02e73babb431248ed025 (patch) | |
tree | 3b39dba244bd13a39abaca5b22d4574983323f3c /src/project.rs | |
parent | a7cbaaa9be2dfc5e4fcdaf342dba98c923a99ab4 (diff) | |
parent | 297521aab3d48f12b09d1b3071c1e13ed7cafdb4 (diff) | |
download | bumper-rs-50258196ee8832ca8d9f02e73babb431248ed025.tar.gz |
Merge branch 'python' into 'main'
Python support
Closes #2
See merge request larswirzenius/bumper!17
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(()) } |