geenforce: import-share recognizes the display scope folder
discover_share only matched 'common' and 'gea-shopfloor-*', so a display/ manifest.json on the share was silently skipped and 'flask geenforce publish display' failed with 'No scope display/runtime'. The display scope is a first-class HTTPS-pull target (kiosks fetch pctype=display), so accept it.
This commit is contained in:
@@ -102,11 +102,13 @@ def build_scope(scopename, phase, manifest_dict, iscommon=False):
|
|||||||
def discover_share(shareroot):
|
def discover_share(shareroot):
|
||||||
"""Yield (scopename, phase, manifest_dict) for runtime manifests on a share.
|
"""Yield (scopename, phase, manifest_dict) for runtime manifests on a share.
|
||||||
|
|
||||||
Reads `common/manifest.json` and every `gea-shopfloor-*/manifest.json`.
|
Reads `common/manifest.json`, `display/manifest.json`, and every
|
||||||
Skips `.bak` / `.pre-*.bak` variants (only the exact `manifest.json`).
|
`gea-shopfloor-*/manifest.json`. Skips `.bak` / `.pre-*.bak` variants
|
||||||
|
(only the exact `manifest.json`).
|
||||||
"""
|
"""
|
||||||
for name in sorted(os.listdir(shareroot)):
|
for name in sorted(os.listdir(shareroot)):
|
||||||
if name != 'common' and not name.startswith('gea-shopfloor-'):
|
if name not in ('common', 'display') \
|
||||||
|
and not name.startswith('gea-shopfloor-'):
|
||||||
continue
|
continue
|
||||||
path = os.path.join(shareroot, name, 'manifest.json')
|
path = os.path.join(shareroot, name, 'manifest.json')
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user