chlog: add series selector
This commit is contained in:
+3
-1
@@ -10,6 +10,7 @@ pub fn generate_entry(
|
||||
changelog_file: &str,
|
||||
cwd: Option<&Path>,
|
||||
user_version: Option<&str>,
|
||||
target_series: Option<&str>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let changelog_path = if let Some(path) = cwd {
|
||||
path.join(changelog_file)
|
||||
@@ -43,6 +44,7 @@ pub fn generate_entry(
|
||||
};
|
||||
|
||||
let (maintainer_name, maintainer_email) = get_maintainer_info()?;
|
||||
let series = target_series.unwrap_or(&series).to_string();
|
||||
let new_entry = format_entry(
|
||||
&package,
|
||||
&new_version,
|
||||
@@ -426,7 +428,7 @@ mod tests {
|
||||
std::env::set_var("DEBFULLNAME", "Maintainer Maintainer");
|
||||
std::env::set_var("DEBEMAIL", "maintainer@maintainer.com");
|
||||
}
|
||||
generate_entry("debian/changelog", Some(repo_dir), None).unwrap();
|
||||
generate_entry("debian/changelog", Some(repo_dir), None, None).unwrap();
|
||||
unsafe {
|
||||
std::env::remove_var("DEBFULLNAME");
|
||||
std::env::remove_var("DEBEMAIL");
|
||||
|
||||
Reference in New Issue
Block a user