Skip to content

Commit 8ad6fc3

Browse files
committed
WIP
1 parent dd82f34 commit 8ad6fc3

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/bootstrap/src/bin/main.rs

+14-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
//! parent directory, and otherwise documentation can be found throughout the `build`
66
//! directory in each respective module.
77
8-
use std::fs::{self, OpenOptions};
9-
use std::io::{self, BufRead, BufReader, IsTerminal, Write};
10-
use std::str::FromStr;
11-
use std::{env, process};
12-
138
use bootstrap::{
149
Build, CONFIG_CHANGE_HISTORY, Config, Flags, Subcommand, debug, find_recent_config_change_ids,
1510
human_readable_changes, t,
1611
};
1712
use build_helper::ci::CiEnv;
13+
use build_helper::git::get_closest_merge_commit;
14+
use std::fs::{self, OpenOptions};
15+
use std::io::{self, BufRead, BufReader, IsTerminal, Write};
16+
use std::process::Command;
17+
use std::str::FromStr;
18+
use std::{env, process};
1819
#[cfg(feature = "tracing")]
1920
use tracing::instrument;
2021

@@ -34,6 +35,14 @@ fn main() {
3435
debug!("parsing config based on flags");
3536
let config = Config::parse(flags);
3637

38+
let merge_commit =
39+
get_closest_merge_commit(Some(&config.src), &config.git_config(), &[]).unwrap();
40+
let current_commit = String::from_utf8(
41+
Command::new("git").arg("rev-parse").arg("HEAD").output().unwrap().stdout,
42+
)
43+
.unwrap();
44+
panic!("Merge commit: {merge_commit}, HEAD: {current_commit}");
45+
3746
let mut build_lock;
3847
let _build_lock_guard;
3948

0 commit comments

Comments
 (0)