fix: avoid fetching, changing remote and switching branch if pull_on_build is false

This commit is contained in:
Gabriele Musco 2023-10-17 14:52:01 +02:00
parent 30873c4969
commit ff49e5bc81

View file

@ -108,10 +108,10 @@ impl Git {
pub fn get_pre_build_jobs(&self, pull_on_build: bool) -> Vec<WorkerJob> {
let mut jobs = Vec::<WorkerJob>::new();
if self.clone_exists() {
jobs.push(self.get_override_remote_url_job());
jobs.push(self.get_fetch_job());
jobs.push(self.get_checkout_ref_job());
if pull_on_build {
jobs.push(self.get_override_remote_url_job());
jobs.push(self.get_fetch_job());
jobs.push(self.get_checkout_ref_job());
jobs.push(self.get_pull_job());
}
} else {