MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / build_asset_spine

Function build_asset_spine

xtask/src/main.rs:7988–8034  ·  view source on GitHub ↗
(
    _manifest: &SourcesManifest,
    profile: &str,
    target: &str,
    args: &[String],
)

Source from the content-addressed store, hash-verified

7986}
7987
7988fn build_asset_spine(
7989 _manifest: &SourcesManifest,
7990 profile: &str,
7991 target: &str,
7992 args: &[String],
7993) -> Result<()> {
7994 let execute = args.iter().any(|arg| arg == "--execute")
7995 || env::var("PGLITE_OXIDE_EXECUTE_ASSET_BUILD").as_deref() == Ok("1");
7996
7997 println!("asset build inputs validated");
7998 println!("profile={profile}");
7999 println!("target-triple={target}");
8000
8001 let commands = [
8002 "assets/wasix-build/docker_pglite.sh",
8003 "assets/wasix-build/docker_runtime_support.sh",
8004 "assets/wasix-build/docker_initdb.sh",
8005 "assets/wasix-build/docker_pgxs_extensions.sh",
8006 "assets/wasix-build/docker_contrib_extensions.sh",
8007 "assets/wasix-build/docker_pgdump.sh",
8008 ];
8009
8010 if !execute {
8011 println!("source-spine build is ready but not executed by default");
8012 println!("run with --execute or PGLITE_OXIDE_EXECUTE_ASSET_BUILD=1 to invoke:");
8013 for command in commands {
8014 println!(" {command}");
8015 }
8016 println!("follow with `assets package` and `assets aot` to refresh publishable artifacts");
8017 return Ok(());
8018 }
8019
8020 for script in commands {
8021 let mut command = Command::new("bash");
8022 command
8023 .arg(script)
8024 .env("PGLITE_OXIDE_BUILD_PROFILE", profile);
8025 run_command(&mut command)?;
8026 }
8027
8028 let outputs = BuildOutputs::discover()?;
8029 validate_build_profile_outputs(&outputs, profile)?;
8030 outputs.write_manifest()?;
8031 validate_build_output_link_closure(&outputs)?;
8032 println!("wrote WASIX build output manifest to {WASIX_BUILD_MANIFEST_PATH}");
8033 Ok(())
8034}
8035
8036fn release_build_assets(
8037 manifest: &SourcesManifest,

Callers 2

assetsFunction · 0.85
release_build_assetsFunction · 0.85

Calls 6

run_commandFunction · 0.85
iterMethod · 0.80
argMethod · 0.80
write_manifestMethod · 0.80

Tested by

no test coverage detected