git flow was a mistake #11

Merged
cafkafk merged 29 commits from dev into main 2023-08-09 16:27:57 +02:00
Showing only changes of commit 0d6afbc772 - Show all commits

View file

@ -321,19 +321,38 @@ macro_rules! run_series {
($conf:ident, $closures:ident) => { ($conf:ident, $closures:ident) => {
for category in $conf.categories.values() { for category in $conf.categories.values() {
for (_, repo) in category.repos.as_ref().expect("failed to get repos").iter() { for (_, repo) in category.repos.as_ref().expect("failed to get repos").iter() {
for instruction in &$closures { use RepoKinds::*;
let f = &instruction.closure; match &repo.kind {
let op = instruction.operation; Some(GitRepo) => {
if !settings::QUIET.load(std::sync::atomic::Ordering::Relaxed) { for instruction in &$closures {
let mut sp = let f = &instruction.closure;
Spinner::new(Spinners::Dots10, format!("{}: {}", repo.name, op)); let op = instruction.operation;
if f(repo) { if !settings::QUIET.load(std::sync::atomic::Ordering::Relaxed) {
sp.stop_and_persist(success_str(), format!("{}: {}", repo.name, op)); let mut sp = Spinner::new(
} else { Spinners::Dots10,
sp.stop_and_persist(failure_str(), format!("{}: {}", repo.name, op)); format!("{}: {}", repo.name, op),
);
if f(repo) {
sp.stop_and_persist(
success_str(),
format!("{}: {}", repo.name, op),
);
} else {
sp.stop_and_persist(
failure_str(),
format!("{}: {}", repo.name, op),
);
}
} else {
f(repo);
}
} }
} else { }
f(repo); None => {
println!("unknown kind {:?}", repo.kind)
}
Some(kind) => {
println!("unknown kind {kind:?}")
} }
} }
} }