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.
This commit is contained in:
Josh Stone 2018-01-25 16:22:58 -08:00
parent 9fd7da904b
commit a76bb8806a

View File

@ -776,7 +776,11 @@ impl Build {
fn release(&self, num: &str) -> String {
match &self.config.channel[..] {
"stable" => num.to_string(),
"beta" => format!("{}-beta.{}", num, self.beta_prerelease_version()),
"beta" => if self.rust_info.is_git() {
format!("{}-beta.{}", num, self.beta_prerelease_version())
} else {
format!("{}-beta", num)
},
"nightly" => format!("{}-nightly", num),
_ => format!("{}-dev", num),
}