Skip to content

Commit

Permalink
Enable multi-digit version numbers; #13
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchane committed Nov 28, 2023
1 parent 4916ad2 commit 5312c49
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/status_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const MAX_TITLE_LENGTH: usize = 120;
/// 2. x.y
/// 3. x
static VERSION_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r"(\d\.\d.\d|\d\.\d|\d)").expect(REGEX_ERROR));
Lazy::new(|| Regex::new(r"(\d+\.\d+.\d+|\d+\.\d+|\d+)").expect(REGEX_ERROR));

/// An overview of the completeness status across all tickets.
#[derive(Default, Serialize)]
Expand Down Expand Up @@ -502,6 +502,12 @@ fn most_common_product(tickets: &[AbstractTicket]) -> Option<&str> {
.map(|(elem, _frequency)| *elem)
}

struct Version {
x: u32,
y: Option<u32>,
z: Option<u32>,
}

/// Try to extract an x.y.z, x.y, or x version from a string.
/// If no such version is found, return the original release string back.
/// The intended purpose is to recognize release strings such as `rhel-9.3.0`,
Expand Down

0 comments on commit 5312c49

Please sign in to comment.