Minor tweaks.
This commit is contained in:
@@ -139,7 +139,7 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
||||
info!("Creating {}", www_root.display());
|
||||
fs::create_dir_all(&www_root)?;
|
||||
}
|
||||
let mut output = Vec::new();
|
||||
let mut output = vec![logging_run(Command::new("git").arg("version"))?];
|
||||
let needs_clone = !build_path.exists();
|
||||
if needs_clone {
|
||||
output.push(logging_run(
|
||||
@@ -156,9 +156,10 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
||||
.arg("-f")
|
||||
.arg("origin"),
|
||||
)?);
|
||||
dbg!(&build_path);
|
||||
// Make sure buildable clone is up to date
|
||||
output.push(logging_run(
|
||||
Command::new("git").current_dir(&build_path).arg("pull"),
|
||||
Command::new("git").current_dir(&build_path).arg("fetch"),
|
||||
)?);
|
||||
let commits = logging_run(Command::new("git").current_dir(&build_path).args([
|
||||
"log",
|
||||
@@ -191,7 +192,6 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
||||
.map(|ts| format!("{}", format_task_status(ts)))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
info!("{}", response);
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user