mirror of
https://github.com/truenas/charts.git
synced 2026-04-08 21:28:46 +08:00
fix pihole stategy (#2266)
* fix pihole stategy * revert test changes * fmt * bump
This commit is contained in:
@@ -3,7 +3,7 @@ description: DNS and Ad-filtering for your network.
|
||||
annotations:
|
||||
title: Pi-hole
|
||||
type: application
|
||||
version: 2.0.6
|
||||
version: 2.0.7
|
||||
apiVersion: v2
|
||||
appVersion: 2024.02.0
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -17,12 +17,20 @@ def newer_mapping(image_tags):
|
||||
return {}
|
||||
|
||||
parts = version.split('.')
|
||||
for idx, val in enumerate(parts):
|
||||
if val == '0':
|
||||
continue
|
||||
|
||||
if len(val) == 1:
|
||||
parts[idx] = '0' + val
|
||||
# Versioning scheme:
|
||||
# Must be x.y.z
|
||||
# Second part has leading 0 if not 0
|
||||
# Third part does not have leading 0
|
||||
|
||||
# Below we make sure the above conditions are met
|
||||
# as the semantic_versioning function modifies the version
|
||||
|
||||
if len(parts) < 3:
|
||||
return {}
|
||||
|
||||
if parts[1] != '0':
|
||||
parts[1] = '0' + parts[1]
|
||||
|
||||
version = '.'.join(parts)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user