about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2018-01-25 16:22:58 -0800
committerJosh Stone <jistone@redhat.com>2018-01-25 16:22:58 -0800
commita76bb8806ae506a5d11c88a3dbd6377d6c4bc1ec (patch)
tree9e08dd8ddfd54e3799e556fc4e21137ed658bf92 /src/bootstrap
parent9fd7da904b46ff7aa78c2e2cc1986c4975aeccc6 (diff)
downloadrust-a76bb8806ae506a5d11c88a3dbd6377d6c4bc1ec.tar.gz
rust-a76bb8806ae506a5d11c88a3dbd6377d6c4bc1ec.zip
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.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 3738828a4ba..9fbbbb0278a 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -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),
         }