Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Jan 22, 2025
1 parent d9416b1 commit 0fafdc2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/common/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ fn main() -> Result<(), Box<dyn Error>> {
// Set the version suffix and whether the version is a nightly build.
// if not on a tag: <BIN> 0.3.0-dev+ba03de0019.1737036656.debug
// if on a tag: <BIN> 0.3.0-stable+ba03de0019.1737036656.release
let mut tag_name = String::from("dev");
if let Ok(tag_name_var) = env::var("TAG_NAME") {
tag_name = tag_name_var;
} else if let Ok(cargo_tag_name_var) = env::var("CARGO_TAG_NAME") {
tag_name = cargo_tag_name_var;
}
let tag_name = env::var("TAG_NAME")
.or_else(|_| env::var("CARGO_TAG_NAME"))
.unwrap_or_else(|_| String::from("dev"));
let (is_nightly, version_suffix) = if tag_name.contains("nightly") {
(true, "-nightly".to_string())
} else {
Expand Down

0 comments on commit 0fafdc2

Please sign in to comment.