Create more missing directories.
This commit is contained in:
parent
4ca427121c
commit
b6f696e40c
23
src/main.rs
23
src/main.rs
@ -103,28 +103,37 @@ fn bench_at_commit(
|
|||||||
|
|
||||||
fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
||||||
info!("Need to reload '{}': {:?}", repo, config);
|
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 commits_root = config.build_root.join("commits");
|
||||||
|
let git_root = config.build_root.join("git");
|
||||||
let www_root = config.www_root.join(repo);
|
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!(
|
dbg!(
|
||||||
&source_path,
|
&source_path,
|
||||||
&build_path,
|
&build_path,
|
||||||
&target_path,
|
&target_path,
|
||||||
&commits_root,
|
&commits_root,
|
||||||
|
&git_root,
|
||||||
&www_root
|
&www_root
|
||||||
);
|
);
|
||||||
|
|
||||||
if !build_path.exists() {
|
|
||||||
info!("Creating {}", build_path.display());
|
|
||||||
fs::create_dir_all(&build_path)?;
|
|
||||||
}
|
|
||||||
if !commits_root.exists() {
|
if !commits_root.exists() {
|
||||||
info!("Creating {}", commits_root.display());
|
info!("Creating {}", commits_root.display());
|
||||||
fs::create_dir_all(&commits_root)?;
|
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() {
|
if !www_root.exists() {
|
||||||
info!("Creating {}", www_root.display());
|
info!("Creating {}", www_root.display());
|
||||||
fs::create_dir_all(&www_root)?;
|
fs::create_dir_all(&www_root)?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user