MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build

Method build

atomic-cli/tests/it/build_version_integration_test.rs:74–90  ·  view source on GitHub ↗
(&self, source: &Path, channel: Option<&str>, commit: Option<&str>)

Source from the content-addressed store, hash-verified

72 }
73
74 fn build(&self, source: &Path, channel: Option<&str>, commit: Option<&str>) -> String {
75 let mut command = Command::new(env!("CARGO"));
76 command
77 .args(["run", "--quiet", "--offline", "--manifest-path"])
78 .arg(source.join("Cargo.toml"))
79 .arg("--target-dir")
80 .arg(&self.target)
81 .env_remove("ATOMIC_BUILD_CHANNEL")
82 .env_remove("ATOMIC_BUILD_COMMIT");
83 if let Some(channel) = channel {
84 command.env("ATOMIC_BUILD_CHANNEL", channel);
85 }
86 if let Some(commit) = commit {
87 command.env("ATOMIC_BUILD_COMMIT", commit);
88 }
89 stdout(command.output().unwrap())
90 }
91
92 fn expected(source: &Path) -> String {
93 let commit = git(source, &["rev-parse", "HEAD"]);

Callers

nothing calls this directly

Calls 3

stdoutFunction · 0.85
unwrapMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected