Skip to content

Commit a76bb88

Browse files
committed
Call non-git beta builds simply x.y.z-beta
We can't use git commands to compute a prerelease version when we're building from a source tarball, or if git is otherwise unavailable. We'll just call such builds `x.y.z-beta`, without a prerelease.
1 parent 9fd7da9 commit a76bb88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bootstrap/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,11 @@ impl Build {
776776
fn release(&self, num: &str) -> String {
777777
match &self.config.channel[..] {
778778
"stable" => num.to_string(),
779-
"beta" => format!("{}-beta.{}", num, self.beta_prerelease_version()),
779+
"beta" => if self.rust_info.is_git() {
780+
format!("{}-beta.{}", num, self.beta_prerelease_version())
781+
} else {
782+
format!("{}-beta", num)
783+
},
780784
"nightly" => format!("{}-nightly", num),
781785
_ => format!("{}-dev", num),
782786
}

0 commit comments

Comments
 (0)