chlog: add series selector
CI / build (push) Successful in 15m3s
CI / snap (push) Successful in 2m6s

This commit is contained in:
2026-08-11 14:42:23 +02:00
parent e3d855ca66
commit d3a07bc80d
4 changed files with 227 additions and 2 deletions
+3 -1
View File
@@ -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");