mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-25 18:33:37 +01:00
Force images from automated branches to a very high semver
This commit is contained in:
@@ -37,8 +37,10 @@ def get_image_version(string) -> str:
|
||||
try:
|
||||
Version(ver)
|
||||
except InvalidVersion:
|
||||
# Strip the last substring following a hyphen for automated branches
|
||||
ver = '-'.join(ver.split('-')[:-1])
|
||||
# Also return a very high (but less than 'latest') semver for automated branches
|
||||
# since the image will most likely be the latest version
|
||||
if any(substr in ver for substr in ['bravo', 'delta', 'foxtrot', 'kilo']):
|
||||
return '99999.9.9'
|
||||
return ver
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user