add current git commit to summary.
This commit is contained in:
parent
9a16dfa960
commit
24c8201920
2 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
from .app import create_app
|
from .app import create_app
|
||||||
from .commands import migrate_databases, transpile_scss, bundle_vendored
|
from .commands import migrate_databases, transpile_scss, bundle_vendored
|
||||||
from .settings import LNBITS_SITE_TITLE, SERVICE_FEE, DEBUG, LNBITS_DATA_FOLDER, WALLET
|
from .settings import LNBITS_SITE_TITLE, SERVICE_FEE, DEBUG, LNBITS_DATA_FOLDER, WALLET, LNBITS_COMMIT
|
||||||
|
|
||||||
migrate_databases()
|
migrate_databases()
|
||||||
transpile_scss()
|
transpile_scss()
|
||||||
|
|
@ -10,6 +10,7 @@ app = create_app()
|
||||||
|
|
||||||
print(
|
print(
|
||||||
f"""Starting LNbits with
|
f"""Starting LNbits with
|
||||||
|
- git version: {LNBITS_COMMIT}
|
||||||
- site title: {LNBITS_SITE_TITLE}
|
- site title: {LNBITS_SITE_TITLE}
|
||||||
- debug: {DEBUG}
|
- debug: {DEBUG}
|
||||||
- data folder: {LNBITS_DATA_FOLDER}
|
- data folder: {LNBITS_DATA_FOLDER}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import subprocess
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
from environs import Env # type: ignore
|
from environs import Env # type: ignore
|
||||||
|
|
@ -27,3 +28,8 @@ DEFAULT_WALLET_NAME = env.str("LNBITS_DEFAULT_WALLET_NAME", default="LNbits wall
|
||||||
PREFER_SECURE_URLS = env.bool("LNBITS_FORCE_HTTPS", default=True)
|
PREFER_SECURE_URLS = env.bool("LNBITS_FORCE_HTTPS", default=True)
|
||||||
|
|
||||||
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
|
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
|
||||||
|
|
||||||
|
try:
|
||||||
|
LNBITS_COMMIT = subprocess.check_output(["git", "-C", LNBITS_PATH, "rev-parse", "HEAD"]).strip().decode("ascii")
|
||||||
|
except:
|
||||||
|
LNBITS_COMMIT = "unknown"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue