Files
archy/scripts/public_app_policy.py

26 lines
1011 B
Python

"""Private test apps must not enter public catalogs or OTA/ISO app payloads.
This is publication policy, not permission to deploy a private app. Private
testing targets and deployment authority are maintained outside release source.
"""
import argparse
from pathlib import Path
import shutil
from release_payload import check_catalog, check_member, excluded, public_catalog
def copy_public_tree(source, dest):
"""Copy an apps/docker source tree into a new staging directory only."""
if dest.exists():
raise ValueError('public app staging destination already exists')
shutil.copytree(source, dest, ignore=lambda directory, names:
[name for name in names if Path(directory) == source and excluded(name)])
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('source', type=Path)
parser.add_argument('destination', type=Path)
args = parser.parse_args()
copy_public_tree(args.source, args.destination)