Commit 419f72a8715a164644ab040c9086b53da958b47d
1 parent
11977ccc
Exists in
master
and in
4 other branches
Change Dev VERSION to timestamp now
When FLASK_ENV is development, set VERSION to 0.3.pre-YYYYMMDDhhmmss This is to show really last version, and also work with the dynamical static asset url. ( See commit 7673935 )
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
resources/pdc_config.py
... | ... | @@ -96,6 +96,11 @@ class DevConfig(Config): |
96 | 96 | # ignores @role_required decorator |
97 | 97 | ROLE_DISABLED = True |
98 | 98 | |
99 | + from datetime import datetime | |
100 | + import re | |
101 | + date = datetime.now().strftime("%y%m%d%H%M") | |
102 | + VERSION = re.sub(r"^(\d\.\d)\..*$", r"\1" + f".pre-{date}", Config.VERSION) | |
103 | + | |
99 | 104 | |
100 | 105 | # Testing configuration |
101 | 106 | # | ... | ... |