mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-28 05:05:12 -05:00
feat: add build id from commit hash (#1095)
* fix old ref * capture git commit as build ID * generate new types * display build on Site Settings page * fix extras crash it extras is none
This commit is contained in:
@@ -32,6 +32,8 @@ class AppSettings(BaseSettings):
|
||||
TOKEN_TIME: int = 48 # Time in Hours
|
||||
SECRET: str
|
||||
|
||||
GIT_COMMIT_HASH: str = "unknown"
|
||||
|
||||
ALLOW_SIGNUP: bool = True
|
||||
|
||||
@property
|
||||
|
||||
@@ -31,8 +31,8 @@ def recipe_extras(func):
|
||||
|
||||
if extras is None:
|
||||
extras = []
|
||||
|
||||
extras = [{"key": key, "value": value} for key, value in extras.items()]
|
||||
else:
|
||||
extras = [{"key": key, "value": value} for key, value in extras.items()]
|
||||
|
||||
return func(*args, extras=extras, **kwargs)
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ class AdminAboutController(BaseAdminController):
|
||||
db_url=settings.DB_URL_PUBLIC,
|
||||
default_group=settings.DEFAULT_GROUP,
|
||||
allow_signup=settings.ALLOW_SIGNUP,
|
||||
build_id=settings.GIT_COMMIT_HASH,
|
||||
)
|
||||
|
||||
@router.get("/statistics", response_model=AppStatistics)
|
||||
|
||||
@@ -23,6 +23,7 @@ class AdminAboutInfo(AppInfo):
|
||||
db_type: str
|
||||
db_url: str | None
|
||||
default_group: str
|
||||
build_id: str
|
||||
|
||||
|
||||
class CheckAppConfig(CamelModel):
|
||||
|
||||
Reference in New Issue
Block a user