コード例 #1
0
ファイル: BoilerPlate.py プロジェクト: KDAB/Make-O-Matic
def getBuild( name, minimumMomVersion ):
	try:
		build = Build( minimumMomVersion, name )
		build.getParameters().parse()
		mApp().getSettings().set( Settings.ScriptLogLevel, build.getParameters().getDebugLevel() )
		build.addLogger( ConsoleLogger() )
		build.addLogger( FileLogger() )
		build.addPlugin( XmlReportGenerator() )
		build.addPlugin( ConsoleReporter() )
		build.addPlugin( IntegrityChecker() )

		build.initialize()
		return build
	except MomException as e:
		print( 'Error during setup, return code {0}: {1}'.format( e.getReturnCode() , str( e ) ), sys.stderr )
		sys.exit( e.getReturnCode() )