From 5afd750c76b071a7aef532799531bcc0f97102e8 Mon Sep 17 00:00:00 2001 From: hockeygoalie35 Date: Mon, 12 Feb 2024 21:17:54 -0500 Subject: [PATCH] Pull version from script, rather than define in .py --- lidarr/ARLChecker | 2 +- lidarr/python/ARLChecker.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lidarr/ARLChecker b/lidarr/ARLChecker index 962c7ea..969944b 100644 --- a/lidarr/ARLChecker +++ b/lidarr/ARLChecker @@ -1,6 +1,6 @@ #!/usr/bin/with-contenv bash ### Default values -scriptVersion="1.3" +scriptVersion="1.4.0" scriptName="ARLChecker" sleepInterval='24h' ### Import Settings diff --git a/lidarr/python/ARLChecker.py b/lidarr/python/ARLChecker.py index 48b6c5c..4485b20 100644 --- a/lidarr/python/ARLChecker.py +++ b/lidarr/python/ARLChecker.py @@ -11,8 +11,13 @@ import logging import os from datetime import datetime +# Pull script version from previous +VERSION = '0.0.0' +with open(os.path.join(os.pardir, "ARLChecker"), "r") as r: + for line in r: + if 'scriptVersion' in line: + VERSION = re.search(r'"([A-Za-z0-9_\./\\-]*)"', line)[0].replace('"','') -VERSION = 0.1 # Logging Setup logging.basicConfig(