mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-02-20 14:05:26 +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:
|
try:
|
||||||
Version(ver)
|
Version(ver)
|
||||||
except InvalidVersion:
|
except InvalidVersion:
|
||||||
# Strip the last substring following a hyphen for automated branches
|
# Also return a very high (but less than 'latest') semver for automated branches
|
||||||
ver = '-'.join(ver.split('-')[:-1])
|
# 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
|
return ver
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user