Skip to content

Commit

Permalink
remove prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed May 7, 2024
1 parent 3ad03a5 commit 934eb94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/propolis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn version() -> &'static str {
.and_then(|branch| Some((branch, option_env!("VERGEN_GIT_SHA")?)))
.and_then(|(branch, sha)| Some((branch, sha, option_env!("VERGEN_GIT_COMMIT_COUNT")?)));

let mut version = format!("Propolis v{}", env!("CARGO_PKG_VERSION"));
let mut version = format!("v{}", env!("CARGO_PKG_VERSION"));
if let Some((branch, sha, commit)) = git {
write!(version, "-{commit} ({sha}) {branch}, ")
.expect("writing to a string never fails");
Expand Down Expand Up @@ -74,7 +74,8 @@ mod tests {
#[test]
fn print_version() {
let v = version();
eprintln!("version: {v}");
assert!(v.starts_with("Propolis v"));
eprintln!("propolis {v}");
assert!(version.contains(env!("CARGO_PKG_VERSION")));
assert!(version.contains("Bhyve API"));
}
}

0 comments on commit 934eb94

Please sign in to comment.