This commit is contained in:
+5
-13
@@ -5,9 +5,7 @@ use std::fs::File;
|
||||
use std::io::{self, BufRead, Read, Write};
|
||||
use std::path::Path;
|
||||
|
||||
/*
|
||||
* Automatically generate a changelog entry from a commit history and previous changelog
|
||||
*/
|
||||
/// Automatically generate a changelog entry from a commit history and previous changelog
|
||||
pub fn generate_entry(
|
||||
changelog_file: &str,
|
||||
cwd: Option<&Path>,
|
||||
@@ -61,10 +59,8 @@ pub fn generate_entry(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute the next (most probable) version number of a package, from old version and
|
||||
* conditions on changes (is ubuntu upload, is a no change rebuild, is a non-maintainer upload)
|
||||
*/
|
||||
/// Compute the next (most probable) version number of a package, from old version and
|
||||
/// conditions on changes (is ubuntu upload, is a no change rebuild, is a non-maintainer upload)
|
||||
fn compute_new_version(
|
||||
old_version: &str,
|
||||
is_ubuntu: bool,
|
||||
@@ -87,9 +83,7 @@ fn compute_new_version(
|
||||
increment_suffix(old_version, "")
|
||||
}
|
||||
|
||||
/*
|
||||
* Increment a version number by 1, for a given suffix
|
||||
*/
|
||||
/// Increment a version number by 1, for a given suffix
|
||||
fn increment_suffix(version: &str, suffix: &str) -> String {
|
||||
// If suffix is empty, we just look for trailing digits
|
||||
// If suffix is not empty, we look for suffix followed by digits
|
||||
@@ -120,9 +114,7 @@ fn increment_suffix(version: &str, suffix: &str) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse a changelog file first entry header, to obtain (package, version, series)
|
||||
*/
|
||||
/// Parse a changelog file first entry header, to obtain (package, version, series)
|
||||
pub fn parse_changelog_header(
|
||||
path: &Path,
|
||||
) -> Result<(String, String, String), Box<dyn std::error::Error>> {
|
||||
|
||||
Reference in New Issue
Block a user