mirror of
https://github.com/truenas/charts.git
synced 2026-11-04 14:44:08 +08:00
remove upgrade_strategy for now
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
import json
|
||||
import sys
|
||||
import re
|
||||
|
||||
from catalog_update.upgrade_strategy import datetime_versioning
|
||||
|
||||
|
||||
# Upstream uses only a single digit for tags
|
||||
VERSION_REG = r'[0-9]*'
|
||||
|
||||
|
||||
def newer_mapping(image_tags):
|
||||
key = list(image_tags.keys())[0]
|
||||
tags = []
|
||||
for tag in image_tags[key]:
|
||||
match = re.fullmatch(VERSION_REG, tag)
|
||||
if match:
|
||||
tags.append(tag.split('-')[0])
|
||||
|
||||
version = datetime_versioning(list(tags), '%y%m%d')
|
||||
if not version:
|
||||
return {}
|
||||
|
||||
return {
|
||||
'tags': {key: f'{version}-bullseye'},
|
||||
'app_version': version,
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
versions_json = json.loads(sys.stdin.read())
|
||||
except ValueError:
|
||||
raise ValueError('Invalid json specified')
|
||||
|
||||
print(json.dumps(newer_mapping(versions_json)))
|
||||
Reference in New Issue
Block a user