Skip to content

Commit

Permalink
Auto merge of #8600 - alexcrichton:deterministic, r=ehuss
Browse files Browse the repository at this point in the history
Build manpage archive deterministically

Keep deterministic builds for Cargo!

Closes #8599
  • Loading branch information
bors committed Aug 10, 2020
2 parents 20d35ff + 624acc8 commit ab32ee8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ fn compress_man() {
.filename("man.tar")
.write(dst, Compression::best());
let mut ar = tar::Builder::new(encoder);
ar.mode(tar::HeaderMode::Deterministic);

let mut add_files = |dir, extension| {
for entry in fs::read_dir(dir).unwrap() {
let path = entry.unwrap().path();
let mut files = fs::read_dir(dir)
.unwrap()
.map(|e| e.unwrap().path())
.collect::<Vec<_>>();
files.sort();
for path in files {
if path.extension() != Some(extension) {
continue;
}
Expand Down

0 comments on commit ab32ee8

Please sign in to comment.