mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 16:19:03 +08:00
Merge pull request #1666 from Suwmlee/master
Add: auto-run config in deploy
This commit is contained in:
commit
0047f24945
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -58,6 +58,7 @@ class ConfigModel:
|
|||||||
DpiScaling: bool = True
|
DpiScaling: bool = True
|
||||||
Password: Optional[str] = None
|
Password: Optional[str] = None
|
||||||
CDN: Union[str, bool] = False
|
CDN: Union[str, bool] = False
|
||||||
|
Run: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class DeployConfig(ConfigModel):
|
class DeployConfig(ConfigModel):
|
||||||
|
|||||||
@ -148,3 +148,8 @@ Deploy:
|
|||||||
# 'false' for self host cdn (automatically)
|
# 'false' for self host cdn (automatically)
|
||||||
# 'https://path.to.your/cdn' to use custom cdn
|
# 'https://path.to.your/cdn' to use custom cdn
|
||||||
CDN: false
|
CDN: false
|
||||||
|
# --run. Auto-run specified config when startup
|
||||||
|
# 'null' default no specified config
|
||||||
|
# '["alas"]' specified "alas" config
|
||||||
|
# '["alas","alas2"]' specified "alas" "alas2" configs
|
||||||
|
Run: null
|
||||||
|
|||||||
@ -1197,7 +1197,14 @@ def app():
|
|||||||
key = args.key or State.deploy_config.Password
|
key = args.key or State.deploy_config.Password
|
||||||
cdn = args.cdn if args.cdn else State.deploy_config.CDN
|
cdn = args.cdn if args.cdn else State.deploy_config.CDN
|
||||||
State.electron = args.electron
|
State.electron = args.electron
|
||||||
instances: List[str] = args.run
|
runs = None
|
||||||
|
if args.run:
|
||||||
|
runs = args.run
|
||||||
|
elif State.deploy_config.Run:
|
||||||
|
# TODO: refactor poor_yaml_read() to support list
|
||||||
|
tmp = State.deploy_config.Run.split(",")
|
||||||
|
runs = [l.strip(" ['\"]") for l in tmp if len(l)]
|
||||||
|
instances: List[str] = runs
|
||||||
|
|
||||||
logger.hr("Webui configs")
|
logger.hr("Webui configs")
|
||||||
logger.attr("Theme", State.deploy_config.Theme)
|
logger.attr("Theme", State.deploy_config.Theme)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user