eeee
This commit is contained in:
parent
1b44386bb6
commit
74c8099efe
@ -1,2 +1,5 @@
|
|||||||
from version import version
|
import version
|
||||||
print(version())
|
if version.local() < version.remote():
|
||||||
|
print("needs update")
|
||||||
|
else:
|
||||||
|
print("is fine")
|
||||||
|
|||||||
10
py/version.py
Normal file
10
py/version.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
def remote():
|
||||||
|
try:
|
||||||
|
process = subprocess.Popen(["lastversion", "ionburger/turdbot"],stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||||
|
return (process.communicate()[0])
|
||||||
|
except:
|
||||||
|
return 0
|
||||||
|
def local():
|
||||||
|
return open("VERSION","r").read()
|
||||||
Loading…
Reference in New Issue
Block a user