Skip to content

Commit

Permalink
wip: move non-legacy tags to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch committed Jan 10, 2025
1 parent c8dd734 commit 299ea0c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modules/localstack/localstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ const (
localstackHostEnvVar = "LOCALSTACK_HOST"
)

var nonLegacyTags = []string{
"latest",
"s3",
"s3-latest",
"stable",
}

func isLegacyMode(image string) bool {
parts := strings.Split(image, ":")
version := parts[len(parts)-1]
Expand All @@ -28,8 +35,10 @@ func isLegacyMode(image string) bool {
version = version[0:pos]
}

if version == "latest" || version == "s3" || version == "s3-latest" || version == "stable" {
return false
for _, tag := range nonLegacyTags {
if version == tag {
return false
}
}

if !strings.HasPrefix(version, "v") {
Expand Down

0 comments on commit 299ea0c

Please sign in to comment.