mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(templates): add version to make_context
Prioritizes COMMIT_HASH environment variable and uses `aurweb.config.AURWEB_VERSION` as a fallback. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
e6679e4c4e
commit
c775e8a692
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ def make_context(request: Request, title: str, next: str = None):
|
|||
"utcnow": int(datetime.utcnow().timestamp()),
|
||||
"config": aurweb.config,
|
||||
"creds": aurweb.auth.creds,
|
||||
"next": next if next else request.url.path
|
||||
"next": next if next else request.url.path,
|
||||
"version": os.environ.get("COMMIT_HASH", aurweb.config.AURWEB_VERSION)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue