mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Change how version with dashes are handled by so-docker-prune
This commit is contained in:
@@ -32,15 +32,15 @@ def get_image_version(string) -> str:
|
|||||||
ver = string.split(':')[-1]
|
ver = string.split(':')[-1]
|
||||||
if ver == 'latest':
|
if ver == 'latest':
|
||||||
# Version doesn't like "latest", so use a high semver
|
# Version doesn't like "latest", so use a high semver
|
||||||
return '999999.9.9'
|
return '99999.9.9'
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
Version(ver)
|
Version(ver)
|
||||||
except InvalidVersion:
|
except InvalidVersion:
|
||||||
# Also return a very high (but less than 'latest') semver for automated branches
|
# Also return a very high semver for any version
|
||||||
# since the image will most likely be the latest version
|
# with a dash in it since it will likely be a dev version of some kind
|
||||||
if any(substr in ver for substr in ['bravo', 'delta', 'foxtrot', 'kilo']):
|
if '-' in ver:
|
||||||
return '99999.9.9'
|
return '999999.9.9'
|
||||||
return ver
|
return ver
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user