about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-09-01 09:08:59 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-09-01 09:08:59 +0200
commit9abc549aa1ce16bf4099a56a91e9dbf6af2baa24 (patch)
tree60a78ee14b7984aa951866d5c9b9fd0f25ac5213 /src/bootstrap
parentde038b746e267a4270cf4ac038fbfd92ce788526 (diff)
downloadrust-9abc549aa1ce16bf4099a56a91e9dbf6af2baa24.tar.gz
rust-9abc549aa1ce16bf4099a56a91e9dbf6af2baa24.zip
Add git-commit-hash in source and extended tarballs too.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/dist.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index b7fcfc75c4f..07ef0430720 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -846,6 +846,8 @@ impl Step for PlainSourceTarball {
 
         // Create the version file
         write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
+        let sha = build.rust_sha().unwrap_or("");
+        write_file(&plain_dst_src.join("git-commit-hash"), sha.as_bytes());
 
         // If we're building from git sources, we need to vendor a complete distribution.
         if build.rust_info.is_git() {
@@ -1158,7 +1160,9 @@ impl Step for Extended {
         install(&build.src.join("LICENSE-APACHE"), &overlay, 0o644);
         install(&build.src.join("LICENSE-MIT"), &overlay, 0o644);
         let version = build.rust_version();
+        let sha = build.rust_sha().unwrap_or("");
         t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes()));
+        t!(t!(File::create(overlay.join("git-commit-hash"))).write_all(sha.as_bytes()));
         install(&etc.join("README.md"), &overlay, 0o644);
 
         // When rust-std package split from rustc, we needed to ensure that during