Skip to content

Commit

Permalink
configure nightly branch name in stage0.json
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jul 11, 2022
1 parent b6df2a7 commit 6bc97d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ pub struct Stage0Config {
pub artifacts_server: String,
pub artifacts_with_llvm_assertions_server: String,
pub git_merge_commit_email: String,
pub nightly_branch: String,
}
#[derive(Default, Deserialize)]
#[cfg_attr(test, derive(Clone))]
Expand Down
13 changes: 5 additions & 8 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,14 +1280,11 @@ impl Build {
// Figure out how many merge commits happened since we branched off master.
// That's our beta number!
// (Note that we use a `..` range, not the `...` symmetric difference.)
let count = output(
self.config
.git()
.arg("rev-list")
.arg("--count")
.arg("--merges")
.arg("refs/remotes/origin/master..HEAD"),
);
let count =
output(self.config.git().arg("rev-list").arg("--count").arg("--merges").arg(format!(
"refs/remotes/origin/{}..HEAD",
self.config.stage0_metadata.config.nightly_branch
)));
let n = count.trim().parse().unwrap();
self.prerelease_version.set(Some(n));
n
Expand Down
3 changes: 2 additions & 1 deletion src/stage0.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"dist_server": "https://static.rust-lang.org",
"artifacts_server": "https://ci-artifacts.rust-lang.org/rustc-builds",
"artifacts_with_llvm_assertions_server": "https://ci-artifacts.rust-lang.org/rustc-builds-alt",
"git_merge_commit_email": "bors@rust-lang.org"
"git_merge_commit_email": "bors@rust-lang.org",
"nightly_branch": "master"
},
"__comments": [
"The configuration above this comment is editable, and can be changed",
Expand Down

0 comments on commit 6bc97d0

Please sign in to comment.