Add monitoring metrics, numeric sorting, report-time display, vehicle number labels, and map layout fixes. Include accumulated mileage, hydrogen, OneOS authentication, open platform, ingestion, deployment, and UI updates. Exclude temporary files, generated reports, and credentials. Validate frontend 632 tests and production build, API packages, vehicle-map tests, and release installer tests. Gateway suite has one pre-existing date-sensitive identity throttling test failure reproduced on the parent commit.
33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Server-local administrative runner. Loads credentials without printing them."""
|
|
import os
|
|
from pathlib import Path
|
|
import shlex
|
|
import subprocess
|
|
import sys
|
|
|
|
root = Path('/opt/lingniu-gzev/current')
|
|
env = os.environ.copy()
|
|
for path in [Path('/opt/lingniu-go-native/env/base.env'),
|
|
Path('/opt/lingniu-vehicle-platform/env/platform.env'),
|
|
Path('/opt/lingniu-gzev/env/gzev.env')]:
|
|
for line in path.read_text(encoding="utf-8").splitlines():
|
|
line = line.strip()
|
|
if not line or line.startswith('#'):
|
|
continue
|
|
key, sep, value = line.partition('=')
|
|
if not sep:
|
|
raise SystemExit('Invalid environment file assignment')
|
|
# Existing service env files use single-line assignments, optionally quoted.
|
|
if value.startswith(('"', "'")):
|
|
parts = shlex.split(value, comments=False)
|
|
if len(parts) != 1:
|
|
raise SystemExit('Invalid quoted environment value')
|
|
value = parts[0]
|
|
env[key.strip()] = value
|
|
if len(sys.argv) > 1 and sys.argv[1] == 'migrate':
|
|
args = [str(root / 'platform-migrate'), str(root / '049_gzev_daily_mileage.sql')]
|
|
else:
|
|
args = [str(root / 'gzev-mileage')] + sys.argv[1:]
|
|
raise SystemExit(subprocess.call(args, env=env))
|