Only push once every iteration

This commit is contained in:
Patrick Lühne 2019-03-02 04:27:14 +01:00
parent 835545c658
commit 7334ec3708
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

View File

@ -415,9 +415,18 @@ impl BenchmarkRepository
Err(error) => panic!("could not write commit: {}", error), Err(error) => panic!("could not write commit: {}", error),
}; };
let push_refspec = format!("refs/remotes/origin/results:refs/heads/results"); trace!("created commit “{}”", commit_id);
trace!("created commit “{}”, using refspec “{}”", commit_id, push_refspec); changed = true;
false
}
);
if changed
{
let push_refspec = format!("refs/remotes/origin/results:refs/heads/results");
trace!("using push refspec “{}”", push_refspec);
let mut remote_callbacks = RemoteCallbacks::new(); let mut remote_callbacks = RemoteCallbacks::new();
remote_callbacks.credentials( remote_callbacks.credentials(
@ -438,12 +447,7 @@ impl BenchmarkRepository
let mut remote = self.repository.find_remote("origin").expect(""); let mut remote = self.repository.find_remote("origin").expect("");
remote.push(&[&push_refspec], Some(&mut push_options)).expect("couldnt push"); remote.push(&[&push_refspec], Some(&mut push_options)).expect("couldnt push");
changed = true;
false
} }
);
} }
info!("all jobs done, all results uploaded"); info!("all jobs done, all results uploaded");