summaryrefslogtreecommitdiffstats
path: root/src/bootstrap/run.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/run.rs')
-rw-r--r--src/bootstrap/run.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bootstrap/run.rs b/src/bootstrap/run.rs
index 25abe7a72..511872903 100644
--- a/src/bootstrap/run.rs
+++ b/src/bootstrap/run.rs
@@ -103,3 +103,25 @@ impl Step for BumpStage0 {
builder.run(&mut cmd);
}
}
+
+#[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct ReplaceVersionPlaceholder;
+
+impl Step for ReplaceVersionPlaceholder {
+ type Output = ();
+ const ONLY_HOSTS: bool = true;
+
+ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
+ run.path("src/tools/replace-version-placeholder")
+ }
+
+ fn make_run(run: RunConfig<'_>) {
+ run.builder.ensure(ReplaceVersionPlaceholder);
+ }
+
+ fn run(self, builder: &Builder<'_>) -> Self::Output {
+ let mut cmd = builder.tool_cmd(Tool::ReplaceVersionPlaceholder);
+ cmd.arg(&builder.src);
+ builder.run(&mut cmd);
+ }
+}