diff --git a/src/main.rs b/src/main.rs index 9a1fcd0..279ccbc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -103,28 +103,37 @@ fn bench_at_commit( fn reload(config: &State, repo: &str) -> Result { info!("Need to reload '{}': {:?}", repo, config); - let source_path = config.source_root.join(repo); - let build_path = config.build_root.join("git").join(repo); - let target_path = config.build_root.join("target").join(repo); + let commits_root = config.build_root.join("commits"); + let git_root = config.build_root.join("git"); let www_root = config.www_root.join(repo); + let target_root = config.build_root.join("target"); + + let source_path = config.source_root.join(repo); + let build_path = git_root.join(repo); + let target_path = target_root.join(repo); dbg!( &source_path, &build_path, &target_path, &commits_root, + &git_root, &www_root ); - if !build_path.exists() { - info!("Creating {}", build_path.display()); - fs::create_dir_all(&build_path)?; - } if !commits_root.exists() { info!("Creating {}", commits_root.display()); fs::create_dir_all(&commits_root)?; } + if !git_root.exists() { + info!("Creating {}", git_root.display()); + fs::create_dir_all(&git_root)?; + } + if !target_root.exists() { + info!("Creating {}", target_root.display()); + fs::create_dir_all(&target_root)?; + } if !www_root.exists() { info!("Creating {}", www_root.display()); fs::create_dir_all(&www_root)?;