From b5f7a44e04d9d995229e0420965a2bd3ec75a953 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Mon, 3 Nov 2025 13:46:16 +0100 Subject: [PATCH] chore: default repo urls and branches in separate module --- src/builders/build_basalt.rs | 9 ++++++--- src/builders/build_libsurvive.rs | 9 ++++++--- src/builders/build_monado.rs | 9 ++++++--- src/builders/build_opencomposite.rs | 9 ++++++--- src/builders/build_openhmd.rs | 14 ++++++++++---- src/builders/build_vapor.rs | 9 ++++++--- src/builders/build_wivrn.rs | 9 ++++++--- src/builders/build_xrizer.rs | 14 ++++++++++---- src/util/git_repos.rs | 23 +++++++++++++++++++++++ src/util/mod.rs | 1 + 10 files changed, 80 insertions(+), 26 deletions(-) create mode 100644 src/util/git_repos.rs diff --git a/src/builders/build_basalt.rs b/src/builders/build_basalt.rs index 291fdc0..61c7e3f 100644 --- a/src/builders/build_basalt.rs +++ b/src/builders/build_basalt.rs @@ -3,7 +3,10 @@ use crate::{ profile::Profile, termcolor::TermColor, ui::job_worker::job::WorkerJob, - util::file_utils::rm_rf, + util::{ + file_utils::rm_rf, + git_repos::{DEFAULT_BASALT_BRANCH, DEFAULT_BASALT_REPO}, + }, }; use std::{ collections::{HashMap, VecDeque}, @@ -23,7 +26,7 @@ pub fn get_build_basalt_jobs(profile: &Profile, clean_build: bool) -> VecDeque VecDeque VecDeq .libsurvive .repo .as_ref() - .unwrap_or(&"https://github.com/cntools/libsurvive".into()) + .unwrap_or(&DEFAULT_LIBSURVIVE_REPO.into()) .clone(), dir: profile.features.libsurvive.path.as_ref().unwrap().clone(), branch: profile @@ -31,7 +34,7 @@ pub fn get_build_libsurvive_jobs(profile: &Profile, clean_build: bool) -> VecDeq .libsurvive .branch .as_ref() - .unwrap_or(&"master".into()) + .unwrap_or(&DEFAULT_LIBSURVIVE_BRANCH.into()) .clone(), }; diff --git a/src/builders/build_monado.rs b/src/builders/build_monado.rs index 8837874..3efbd81 100644 --- a/src/builders/build_monado.rs +++ b/src/builders/build_monado.rs @@ -3,7 +3,10 @@ use crate::{ profile::Profile, termcolor::TermColor, ui::job_worker::job::WorkerJob, - util::file_utils::rm_rf, + util::{ + file_utils::rm_rf, + git_repos::{DEFAULT_MONADO_BRANCH, DEFAULT_MONADO_REPO}, + }, }; use std::{ collections::{HashMap, VecDeque}, @@ -21,13 +24,13 @@ pub fn get_build_monado_jobs(profile: &Profile, clean_build: bool) -> VecDeque Vec .ovr_comp .repo .as_ref() - .unwrap_or(&"https://gitlab.com/znixian/OpenOVR.git".into()) + .unwrap_or(&DEFAULT_OPENCOMPOSITE_REPO.into()) .clone(), dir: profile.ovr_comp.path.clone(), branch: profile .ovr_comp .branch .as_ref() - .unwrap_or(&"openxr".into()) + .unwrap_or(&DEFAULT_OPENCOMPOSITE_BRANCH.into()) .clone(), }; diff --git a/src/builders/build_openhmd.rs b/src/builders/build_openhmd.rs index 1157eca..977bce3 100644 --- a/src/builders/build_openhmd.rs +++ b/src/builders/build_openhmd.rs @@ -1,6 +1,12 @@ use crate::{ - build_tools::git::Git, profile::Profile, termcolor::TermColor, ui::job_worker::job::WorkerJob, - util::file_utils::rm_rf, + build_tools::git::Git, + profile::Profile, + termcolor::TermColor, + ui::job_worker::job::WorkerJob, + util::{ + file_utils::rm_rf, + git_repos::{DEFAULT_OPENHMD_BRANCH, DEFAULT_OPENHMD_REPO}, + }, }; use std::{collections::VecDeque, path::Path}; @@ -17,7 +23,7 @@ pub fn get_build_openhmd_jobs(profile: &Profile, clean_build: bool) -> VecDeque< .openhmd .repo .as_ref() - .unwrap_or(&"https://github.com/thaytan/OpenHMD".into()) + .unwrap_or(&DEFAULT_OPENHMD_REPO.into()) .clone(), dir: profile.features.openhmd.path.as_ref().unwrap().clone(), branch: profile @@ -25,7 +31,7 @@ pub fn get_build_openhmd_jobs(profile: &Profile, clean_build: bool) -> VecDeque< .openhmd .branch .as_ref() - .unwrap_or(&"rift-room-config".into()) + .unwrap_or(&DEFAULT_OPENHMD_BRANCH.into()) .clone(), }; diff --git a/src/builders/build_vapor.rs b/src/builders/build_vapor.rs index 5a05932..a868aeb 100644 --- a/src/builders/build_vapor.rs +++ b/src/builders/build_vapor.rs @@ -3,7 +3,10 @@ use crate::{ profile::Profile, termcolor::TermColor, ui::job_worker::job::WorkerJob, - util::file_utils::rm_rf, + util::{ + file_utils::rm_rf, + git_repos::{DEFAULT_VAPOR_BRANCH, DEFAULT_VAPOR_REPO}, + }, }; use std::{ collections::{HashMap, VecDeque}, @@ -22,14 +25,14 @@ pub fn get_build_vapor_jobs(profile: &Profile, clean_build: bool) -> VecDeque VecDeque VecDeque