Pull version from script, rather than define in .py
This commit is contained in:
parent
5a1e5acee3
commit
5afd750c76
2 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
### Default values
|
### Default values
|
||||||
scriptVersion="1.3"
|
scriptVersion="1.4.0"
|
||||||
scriptName="ARLChecker"
|
scriptName="ARLChecker"
|
||||||
sleepInterval='24h'
|
sleepInterval='24h'
|
||||||
### Import Settings
|
### Import Settings
|
||||||
|
|
|
@ -11,8 +11,13 @@ import logging
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
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 Setup
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
|
Loading…
Reference in a new issue