Minor tweaks.
This commit is contained in:
parent
842fd4bdd6
commit
28e430c8cf
@ -8,6 +8,6 @@ port = 9346
|
|||||||
# Uncomment to make it production like.
|
# Uncomment to make it production like.
|
||||||
#log_level = "critical"
|
#log_level = "critical"
|
||||||
|
|
||||||
source_root = "/net/nasx/mnt/storage/aoc/"
|
source_root = "/net/nasx/mnt/storage/aoc/github/"
|
||||||
build_root = "/tmp/aocsync/"
|
build_root = "/tmp/aocsync/"
|
||||||
www_root = "/tmp/aocsync-serve/"
|
www_root = "/tmp/aocsync-serve/"
|
||||||
|
|||||||
@ -139,7 +139,7 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
|||||||
info!("Creating {}", www_root.display());
|
info!("Creating {}", www_root.display());
|
||||||
fs::create_dir_all(&www_root)?;
|
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();
|
let needs_clone = !build_path.exists();
|
||||||
if needs_clone {
|
if needs_clone {
|
||||||
output.push(logging_run(
|
output.push(logging_run(
|
||||||
@ -156,9 +156,10 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
|||||||
.arg("-f")
|
.arg("-f")
|
||||||
.arg("origin"),
|
.arg("origin"),
|
||||||
)?);
|
)?);
|
||||||
|
dbg!(&build_path);
|
||||||
// Make sure buildable clone is up to date
|
// Make sure buildable clone is up to date
|
||||||
output.push(logging_run(
|
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([
|
let commits = logging_run(Command::new("git").current_dir(&build_path).args([
|
||||||
"log",
|
"log",
|
||||||
@ -191,7 +192,6 @@ fn reload(config: &State<Config>, repo: &str) -> Result<String, SyncError> {
|
|||||||
.map(|ts| format!("{}", format_task_status(ts)))
|
.map(|ts| format!("{}", format_task_status(ts)))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n");
|
.join("\n");
|
||||||
info!("{}", response);
|
|
||||||
Ok(response)
|
Ok(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
{% for d in dirs %}
|
{% for d in dirs %}
|
||||||
<div><a href="/results/{{ d }}/report/">{{ d }}</a></div>
|
<div><a href="/results/{{ d }}/report/">{{ d }}</a></div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<div>Source in <a href="https://git.z.xinu.tv/wathiede/aocsync">git.</a>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user