Skip to content

Commit

Permalink
tdarr: fix versions containing 5 (#2757)
Browse files Browse the repository at this point in the history
Not knowing python I left in the `.strip(STRIP_TEXT)` thinking it operated like replace while in fact it's more like a regex removal.  Tdarr has not used the _ffmpeg5 suffix in about a year so just removing it from the upgrade_strategy to fix.
  • Loading branch information
swensorm authored Aug 27, 2024
1 parent b284ced commit 9bfb735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/ix-dev/community/tdarr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Tdarr is a Distributed Transcoding System
annotations:
title: Tdarr
type: application
version: 1.2.11
version: 1.2.12
apiVersion: v2
appVersion: 2.24.4
kubeVersion: '>=1.16.0-0'
Expand Down
5 changes: 2 additions & 3 deletions library/ix-dev/community/tdarr/upgrade_strategy
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ from catalog_update.upgrade_strategy import semantic_versioning


# Drop _ffmpeg5 after Cobia is released for a while
RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(_ffmpeg5)?')
RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?')
RE_CLEAN_VERSION = re.compile(r'0+([1-9])')
STRIP_TEXT = '_ffmpeg5'


def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {
RE_CLEAN_VERSION.sub('\\1', t.strip(STRIP_TEXT)): t
RE_CLEAN_VERSION.sub('\\1', t): t
for t in image_tags[key]
if RE_STABLE_VERSION.fullmatch(t)
}
Expand Down

0 comments on commit 9bfb735

Please sign in to comment.