rename github_repository to git_repository
This commit is contained in:
parent
4a0873533f
commit
580fa0c1a9
@ -12,7 +12,7 @@ pub fn suggest(builder: &Builder<'_>, run: bool) {
|
||||
let git_config = builder.config.git_config();
|
||||
let suggestions = builder
|
||||
.tool_cmd(Tool::SuggestTests)
|
||||
.env("SUGGEST_TESTS_GITHUB_REPOSITORY", git_config.github_repository)
|
||||
.env("SUGGEST_TESTS_GIT_REPOSITORY", git_config.git_repository)
|
||||
.env("SUGGEST_TESTS_NIGHTLY_BRANCH", git_config.nightly_branch)
|
||||
.output()
|
||||
.expect("failed to run `suggest-tests` tool");
|
||||
|
@ -1874,7 +1874,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
|
||||
}
|
||||
|
||||
let git_config = builder.config.git_config();
|
||||
cmd.arg("--github-repository").arg(git_config.github_repository);
|
||||
cmd.arg("--git-repository").arg(git_config.git_repository);
|
||||
cmd.arg("--nightly-branch").arg(git_config.nightly_branch);
|
||||
|
||||
builder.ci_env.force_coloring_in_ci(&mut cmd);
|
||||
|
@ -319,7 +319,7 @@ pub struct Stage0Config {
|
||||
pub artifacts_server: String,
|
||||
pub artifacts_with_llvm_assertions_server: String,
|
||||
pub git_merge_commit_email: String,
|
||||
pub github_repository: String,
|
||||
pub git_repository: String,
|
||||
pub nightly_branch: String,
|
||||
}
|
||||
#[derive(Default, Deserialize, Clone)]
|
||||
@ -2009,7 +2009,7 @@ impl Config {
|
||||
|
||||
pub fn git_config(&self) -> GitConfig<'_> {
|
||||
GitConfig {
|
||||
github_repository: &self.stage0_metadata.config.github_repository,
|
||||
git_repository: &self.stage0_metadata.config.git_repository,
|
||||
nightly_branch: &self.stage0_metadata.config.nightly_branch,
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"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",
|
||||
"github_repository": "rust-lang/rust",
|
||||
"git_repository": "rust-lang/rust",
|
||||
"nightly_branch": "master"
|
||||
},
|
||||
"__comments": [
|
||||
|
@ -2,7 +2,7 @@ use std::process::Stdio;
|
||||
use std::{path::Path, process::Command};
|
||||
|
||||
pub struct GitConfig<'a> {
|
||||
pub github_repository: &'a str,
|
||||
pub git_repository: &'a str,
|
||||
pub nightly_branch: &'a str,
|
||||
}
|
||||
|
||||
@ -45,8 +45,8 @@ pub fn get_rust_lang_rust_remote(
|
||||
|
||||
let rust_lang_remote = stdout
|
||||
.lines()
|
||||
.find(|remote| remote.contains(config.github_repository))
|
||||
.ok_or_else(|| format!("{} remote not found", config.github_repository))?;
|
||||
.find(|remote| remote.contains(config.git_repository))
|
||||
.ok_or_else(|| format!("{} remote not found", config.git_repository))?;
|
||||
|
||||
let remote_name =
|
||||
rust_lang_remote.split('.').nth(1).ok_or_else(|| "remote name not found".to_owned())?;
|
||||
|
@ -373,7 +373,7 @@ pub struct Config {
|
||||
pub nocapture: bool,
|
||||
|
||||
// Needed both to construct build_helper::git::GitConfig
|
||||
pub github_repository: String,
|
||||
pub git_repository: String,
|
||||
pub nightly_branch: String,
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ impl Config {
|
||||
|
||||
pub fn git_config(&self) -> GitConfig<'_> {
|
||||
GitConfig {
|
||||
github_repository: &self.github_repository,
|
||||
git_repository: &self.git_repository,
|
||||
nightly_branch: &self.nightly_branch,
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ impl ConfigBuilder {
|
||||
self.host.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
|
||||
"--target",
|
||||
self.target.as_deref().unwrap_or("x86_64-unknown-linux-gnu"),
|
||||
"--github-repository=",
|
||||
"--git-repository=",
|
||||
"--nightly-branch=",
|
||||
];
|
||||
let mut args: Vec<String> = args.iter().map(ToString::to_string).collect();
|
||||
|
@ -145,7 +145,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||
.reqopt("", "channel", "current Rust channel", "CHANNEL")
|
||||
.optflag("", "git-hash", "run tests which rely on commit version being compiled into the binaries")
|
||||
.optopt("", "edition", "default Rust edition", "EDITION")
|
||||
.reqopt("", "github-repository", "name of the GitHub repository", "ORG/REPO")
|
||||
.reqopt("", "git-repository", "name of the git repository", "ORG/REPO")
|
||||
.reqopt("", "nightly-branch", "name of the git branch for nightly", "BRANCH");
|
||||
|
||||
let (argv0, args_) = args.split_first().unwrap();
|
||||
@ -310,7 +310,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
|
||||
|
||||
nocapture: matches.opt_present("nocapture"),
|
||||
|
||||
github_repository: matches.opt_str("github-repository").unwrap(),
|
||||
git_repository: matches.opt_str("git-repository").unwrap(),
|
||||
nightly_branch: matches.opt_str("nightly-branch").unwrap(),
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ use suggest_tests::get_suggestions;
|
||||
fn main() -> ExitCode {
|
||||
let modified_files = get_git_modified_files(
|
||||
&GitConfig {
|
||||
github_repository: &env("SUGGEST_TESTS_GITHUB_REPOSITORY"),
|
||||
git_repository: &env("SUGGEST_TESTS_GIT_REPOSITORY"),
|
||||
nightly_branch: &env("SUGGEST_TESTS_NIGHTLY_BRANCH"),
|
||||
},
|
||||
None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user