8363016982
* release: 2023.3.0 * providers/ldap: fix duplicate attributes (#4972) closes #4971 Signed-off-by: Jens Langhammer <jens@goauthentik.io> * providers/oauth2: fix response for response_type code and response_mode fragment (#4975) * web/flows: fix authenticator selector in dark mode (#4974) Signed-off-by: Jens Langhammer <jens@goauthentik.io> * release: 2023.3.1 --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
21 lines
575 B
Python
21 lines
575 B
Python
"""authentik"""
|
|
from os import environ
|
|
from typing import Optional
|
|
|
|
__version__ = "2023.3.1"
|
|
ENV_GIT_HASH_KEY = "GIT_BUILD_HASH"
|
|
|
|
|
|
def get_build_hash(fallback: Optional[str] = None) -> str:
|
|
"""Get build hash"""
|
|
build_hash = environ.get(ENV_GIT_HASH_KEY, fallback if fallback else "")
|
|
return fallback if build_hash == "" and fallback else build_hash
|
|
|
|
|
|
def get_full_version() -> str:
|
|
"""Get full version, with build hash appended"""
|
|
version = __version__
|
|
if (build_hash := get_build_hash()) != "":
|
|
version += "." + build_hash
|
|
return version
|