From c93ee4dcd936524a96d043587f47bf0c778a4430 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Wed, 27 Mar 2024 13:59:21 -0400 Subject: [PATCH] fix: regex --- sync/latest-images/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/latest-images/main.go b/sync/latest-images/main.go index 4366ca0..80b081b 100644 --- a/sync/latest-images/main.go +++ b/sync/latest-images/main.go @@ -63,7 +63,7 @@ func FindRecentImages(bucketName string, prefix string, version string, imageTyp log.Fatalf("uh oh: %v", err) } - pattern := regexp.MustCompile(`(?PRocky-(?P[0-9]+)-(?P\w+)(?:-(?P\w+))?-(?:[0-9]+)\.(?P[0-9])-(?P[0-9]+)\.(?P[0-9]+)\.(?P\w+)/(?P[0-9]+)/(?P(.+\.(?P(box|qcow2|raw|tar\.xz|vhd)))))$`) + pattern := regexp.MustCompile(`(?PRocky-(?P[0-9]+)-(?P\w+)(?:-(?P\w+))?-(?:[0-9]+)\.(?P[0-9]+)-(?P[0-9]+)\.(?P[0-9]+)\.(?P\w+)/(?P[0-9]+)/(?P(.+\.(?P(box|qcow2|raw|tar\.xz|vhd)))))$`) // Loop through the objects and find the latest one for each file type latestByTypeVariant := map[string]map[string]*Image{} for _, obj := range items {