(catalog: &ExtensionCatalog)
| 373 | } |
| 374 | |
| 375 | fn write_build_plan_files(catalog: &ExtensionCatalog) -> Result<()> { |
| 376 | let texts = build_plan_texts(catalog)?; |
| 377 | for (path, text) in [ |
| 378 | (BUILD_PLAN_PATH, texts.json), |
| 379 | (CONTRIB_BUILD_PLAN_PATH, texts.contrib_tsv), |
| 380 | (PGXS_BUILD_PLAN_PATH, texts.pgxs_tsv), |
| 381 | ] { |
| 382 | let path = Path::new(path); |
| 383 | if let Some(parent) = path.parent() { |
| 384 | fs::create_dir_all(parent).with_context(|| format!("create {}", parent.display()))?; |
| 385 | } |
| 386 | fs::write(path, text).with_context(|| format!("write {}", path.display()))?; |
| 387 | } |
| 388 | Ok(()) |
| 389 | } |
| 390 | |
| 391 | fn build_plan_texts(catalog: &ExtensionCatalog) -> Result<BuildPlanTexts> { |
| 392 | let plan = build_plan(catalog)?; |
no test coverage detected