Skip to content

Commit c5040be

Browse files
committed
deterministic builds
1 parent 1cc39a9 commit c5040be

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

‎build.rs‎

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,10 @@
33
#![deny(clippy::all, clippy::cargo, clippy::nursery, clippy::pedantic)]
44
#![allow(clippy::cargo_common_metadata, clippy::wildcard_dependencies)]
55

6-
use std::{
7-
error::Error,
8-
process::{Command, Stdio},
9-
};
6+
fn main() {
7+
println!("cargo:rustc-env=SAD_ARGV_UUID=4f3828bf-ebf6-4f46-b07b-7eb9e4ae4380");
108

11-
fn uuid() -> Result<String, Box<dyn Error>> {
12-
#[cfg(target_family = "windows")]
13-
let py = "python.exe";
14-
#[cfg(target_family = "unix")]
15-
let py = "python3";
16-
let proc = Command::new(py)
17-
.arg("-c")
18-
.arg("import uuid; print(uuid.uuid4())")
19-
.stdout(Stdio::piped())
20-
.output()?;
21-
assert!(proc.status.success());
22-
let uuid = String::from_utf8(proc.stdout)?.trim().into();
23-
Ok(uuid)
24-
}
25-
26-
fn main() -> Result<(), Box<dyn Error>> {
27-
println!("cargo:rustc-env=SAD_ARGV_UUID={uuid}", uuid = uuid()?);
28-
29-
println!("cargo:rustc-env=SAD_PREVIEW_UUID={uuid}", uuid = uuid()?);
30-
31-
println!("cargo:rustc-env=SAD_PATCH_UUID={uuid}", uuid = uuid()?);
9+
println!("cargo:rustc-env=SAD_PREVIEW_UUID=b477f4c9-9fe7-4224-92cd-1632521ec2f0",);
3210

33-
Ok(())
11+
println!("cargo:rustc-env=SAD_PATCH_UUID=cadfe8eb-0dae-46be-bb4a-a058330e62a4",);
3412
}

0 commit comments

Comments
 (0)