Skip to content

Commit

Permalink
Rollup merge of rust-lang#135187 - onur-ozkan:release-fix, r=pietroal…
Browse files Browse the repository at this point in the history
…bini

apply a workaround fix for the release roadblock

This has been a problem since the last two releases.

r? pietroalbini
  • Loading branch information
GuillaumeGomez authored Jan 7, 2025
2 parents a33da79 + 614dc1c commit 2598d60
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/build_helper/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,19 @@ pub fn get_closest_merge_commit(
git.current_dir(git_dir);
}

let channel = include_str!("../../ci/channel");

let merge_base = {
if CiEnv::is_ci() {
if CiEnv::is_ci() &&
// FIXME: When running on rust-lang managed CI and it's not a nightly build,
// `git_upstream_merge_base` fails with an error message similar to this:
// ```
// called `Result::unwrap()` on an `Err` value: "command did not execute successfully:
// cd \"/checkout\" && \"git\" \"merge-base\" \"origin/master\" \"HEAD\"\nexpected success, got: exit status: 1\n"
// ```
// Investigate and resolve this issue instead of skipping it like this.
(channel == "nightly" || !CiEnv::is_rust_lang_managed_ci_job())
{
git_upstream_merge_base(config, git_dir).unwrap()
} else {
// For non-CI environments, ignore rust-lang/rust upstream as it usually gets
Expand Down

0 comments on commit 2598d60

Please sign in to comment.