Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/pop-ci/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,9 @@ sudo sbuild-update \

let mut repo_ctx = RepoContext::default();
for (branch, commit) in heads.iter() {
let mut parts = branch.id().splitn(2, '_');
let mut parts = branch.id().split('_');
let pocket = Pocket::new(parts.next().unwrap());
let pattern_opt = parts.next();
let patterns: Vec<_> = parts.collect();

for suite in Suite::ALL.iter() {
match suite.distro() {
Expand All @@ -422,9 +422,9 @@ sudo sbuild-update \
}

let key = (pocket.clone(), suite.clone());
let insert = if let Some(pattern) = pattern_opt {
let insert = if !patterns.is_empty() {
// Insert pattern entry if pattern matches
pattern == suite.id()
patterns.contains(&suite.id())
} else if suite.wildcard(repo_name) {
// Only insert wildcard entry if no others are found, and suite supports it
!repo_ctx.pockets.contains_key(&key)
Expand Down