(
_manifest: &SourcesManifest,
profile: &str,
target: &str,
args: &[String],
)
| 7986 | } |
| 7987 | |
| 7988 | fn 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 | |
| 8036 | fn release_build_assets( |
| 8037 | manifest: &SourcesManifest, |
no test coverage detected