def main(): ''' Main method ''' args = parseArgs() if args.option == 'version': print(__version__) sys.exit(0) try: prevalidations(args) if args.option == 'merge_delta': mergeDelta(args.source, args.target, args.remote, args.fetch, args.reset, args.delta_folder, args.source_folder, args.api_version, args.describe) print(f'{SUCCESS_LINE} Build Delta Package Finished correctly') elif args.option == 'build_delta': buildDelta(args.source, args.target, args.remote, args.fetch, args.delta_folder, args.source_folder, args.api_version, args.describe) except MergerExceptionWarning as exception: print(f'{WARNING_LINE} {exception}, finished with warnings...') sys.exit(exception.ERROR_CODE) except MergerException as exception: print(f'{FATAL_LINE} {exception}, exiting...') sys.exit(exception.ERROR_CODE)
def main(): args = argparser.parseArgs() request = str(args.jsonBody).replace('\\n', '') packageBody = json.loads(request) generatePackage(packageBody, args.apiVersion)
def main(): args = argparser.parseArgs() mapAlerts, mapIssuesByLevel = getAlertsFromReport( args.reportFile, args.srcPath ) if len( mapAlerts ) > 0: createReport( mapAlerts, mapIssuesByLevel, args.outputFile )
def main(): args = argparser.parseArgs() setParseableObjects = readDescribe( args.describePath, SET_PARSEABLE_FOLDERS ) for folder in os.listdir( args.srcRetrievedPath ): pathFolder = f'{args.srcRetrievedPath}/{folder}' if os.path.isdir( pathFolder ): for fileName in os.listdir( pathFolder ): if folder in setParseableObjects: mergeFile( args.srcPath, args.srcRetrievedPath, folder, fileName ) else: copyFiles( args.srcPath, args.srcRetrievedPath, folder, fileName )