publish-package.py 758 Bytes
Newer Older
1 2 3 4 5 6
#!/usr/bin/python3
import os
import sys
import tarfile
import tempfile
import argparse
7
from helperslib import Packages
8 9 10 11 12 13 14 15 16 17

# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to publish a package into an archive.')
parser.add_argument('--package', type=str, required=True)
parser.add_argument('--platform', type=str, required=True)
parser.add_argument('--environment', type=str, required=True)
arguments = parser.parse_args()

# Initialize the archive manager and ask it to publish the package
# This will also cause the Manifest for the Archive to be regenerated
18
ourArchive = Packages.Archive( arguments.environment, arguments.platform, usingCache = False )
19 20
ourArchive.publishPackage( arguments.package )