Re-automate versioning (#130)
This commit is contained in:
parent
417af1a5f1
commit
7316c3a70c
@ -775,9 +775,22 @@ def status():
|
|||||||
filen = url_for('static', filename='img/open.png')
|
filen = url_for('static', filename='img/open.png')
|
||||||
caniregister = True
|
caniregister = True
|
||||||
|
|
||||||
version = config['version']
|
try:
|
||||||
|
with open ("version.txt", "r") as versionFile:
|
||||||
|
hsh=versionFile.readlines()[0]
|
||||||
|
update=versionFile.readlines()[1]
|
||||||
|
#tag=versionFile.readlines()[2]
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
tag = str(subprocess.check_output(["git", "describe", "--tags"]).strip())[2:-1]
|
||||||
|
hsh = str(subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).strip())[2:-1]
|
||||||
|
update = str(subprocess.check_output(["git", "log", "-1", "--format=%cd"]).strip())[2:-1]
|
||||||
|
except:
|
||||||
|
hsh="Unknown"
|
||||||
|
update="Unknown"
|
||||||
|
tag="Unknown"
|
||||||
return render_template('status.html', title='STATUS', count=count, max=config['maxInstanceUsers'], file=filen,
|
return render_template('status.html', title='STATUS', count=count, max=config['maxInstanceUsers'], file=filen,
|
||||||
cani=caniregister, version=config['version'])
|
cani=caniregister, hash=hsh, update=update, tag=tag)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/error/<errno>')
|
@app.route('/error/<errno>')
|
||||||
|
@ -46,7 +46,9 @@
|
|||||||
<div class="ui text container center aligned centered">
|
<div class="ui text container center aligned centered">
|
||||||
<div class="ui segments">
|
<div class="ui segments">
|
||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
<p>Yotter version: <b><a href="https://github.com/ytorg/Yotter/tags">{{version}}</a></b></p>
|
<p>Yotter version: <b><a href="https://github.com/ytorg/Yotter/tags">{{tag}}</a></b></p>
|
||||||
|
<p>Latest update: <b><a href="https://github.com/ytorg/Yotter/commits/">{{update}}</a></b></p>
|
||||||
|
<p>Commit hash: <b><a href="https://github.com/ytorg/Yotter/commits/">{{hash}}</a></b></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,6 +11,5 @@
|
|||||||
"admin_message":"Message from the admin text",
|
"admin_message":"Message from the admin text",
|
||||||
"admin_user":"admin_username",
|
"admin_user":"admin_username",
|
||||||
"max_old_user_days": 60,
|
"max_old_user_days": 60,
|
||||||
"donate_url": "",
|
"donate_url": ""
|
||||||
"version": "2020.11.05"
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user