Exemplo n.º 1
0
def actionCreateNuget():
    CreateNuget.init()

    for target in Settings.targets:
        for platform in Settings.targetPlatforms:
            Logger.printStartActionMessage('Create Nuget for ' + target)
            if checkIfBuildWasSuccessful() == True:
                result = CreateNuget.run(target, platform, Settings.targetCPUs,
                                         Settings.targetConfigurations,
                                         Settings.nugetFolderPath,
                                         Settings.nugetVersionInfo)
            else:
                result = ERROR_BUILD_FAILED
                Logger.printColorMessage(
                    'Create Nuget cannot run because build has failed',
                    ColoredFormatter.YELLOW)
                Logger.printEndActionMessage(
                    'Create Nuget not run for ' + target + ' ' + platform,
                    ColoredFormatter.YELLOW)
                CreateNuget.executionTime = 0
            Summary.addNugetSummary(target, platform, result,
                                    CreateNuget.executionTime)
            if result != NO_ERROR:
                Logger.printEndActionMessage(
                    'Failed to create NuGet package ' + target + ' ' +
                    platform, ColoredFormatter.RED)
                #Terminate script execution if stopExecutionOnError is set to True in userdef
                shouldEndOnError(result)
            else:
                Logger.printEndActionMessage('Create Nuget for ' + target +
                                             ' ' + platform)
Exemplo n.º 2
0
def actionCreateNuget():
    CreateNuget.init()

    for target in Settings.targets:
        Logger.printStartActionMessage('Create Nuget for ' + target)
        result = CreateNuget.run(target, Settings.targetPlatforms,
                                 Settings.targetCPUs,
                                 Settings.targetConfigurations,
                                 Settings.nugetFolderPath,
                                 Settings.nugetVersionInfo)
        Summary.addNugetSummary(target, result, CreateNuget.executionTime)
        if result != NO_ERROR:
            Logger.printEndActionMessage(
                'Failed to create NuGet package ' + target,
                ColoredFormatter.RED)
            #Terminate script execution if stopExecutionOnError is set to True in userdef
            shouldEndOnError(result)
        else:
            Logger.printEndActionMessage('Create Nuget for ' + target)