Pull version from script, rather than define in .py

This commit is contained in:
hockeygoalie35 2024-02-12 21:17:54 -05:00
parent 5a1e5acee3
commit 5afd750c76
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash
### Default values
scriptVersion="1.3"
scriptVersion="1.4.0"
scriptName="ARLChecker"
sleepInterval='24h'
### Import Settings

View file

@ -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(