diff -r 820b22e13ff1 -r 39c28ec933dd buildframework/helium/tools/relnotes/relnotes.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/relnotes/relnotes.ant.xml Mon May 10 19:54:49 2010 +0100 @@ -0,0 +1,370 @@ + + + + + + Generates a release note by modifying a template (that you can edit yourself) with + values from the build and Synergy. + + * Modifies a RTF template with values from build + * Adds table of errors and warnings + * Generates list of baselines, projects and tasks used + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import ant +import rtfutils +rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}')) +rn.rtftable(ant.get_property(r'${temp.build.dir}/variant_@{product.name}.csv'), ant.get_property(r'${releasenotes.temp.output}'), ant.get_property(r'Type@{product.name}VariantTableHere')) + + + + + + + + + + + + + macro: ${helium.dir}/tools/common/templates/macro + + + dbPath: ${metadata.dbfile} + ant: antProperties() + + + +import ant +import rtfutils +rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}')) +rn.rtftable(ant.get_property(r'${releasenotes.temp.errors}'), ant.get_property(r'${releasenotes.temp.output}'), 'TypeErrorTableSummaryHere') + + + + + + + + +import ant +import rtfutils +rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}')) +rn.rtfimage(ant.get_property(r'${releasenotes.logo}'), ant.get_property(r'${releasenotes.temp.output}'), 'AddProductImageHere') + + + + + + + + + + + +import traceback +import ant +import logging +import ccmutil +logging.disable(logging.INFO) +session = None +try: + database = ant.get_property(r'${ccm.database}') + username = ant.get_property(r'${ccm.user.login}') + password = ant.get_property(r'${ccm.user.password}') + engine = ant.get_property(r'${ccm.engine.host}') + dbpath = ant.get_property(r'${ccm.database.path}') + session = ccmutil.get_session(database, username, password, engine, dbpath) + cmproject = session.create(ant.get_property(r'${ccm.toplevel.project}')) + print cmproject.baseline + session.close() +except Exception, ex: + print 'Caught exception: ' + str(ex) + traceback.print_exc() + if session: + session.close() + + + + + + + + + + + + + +import amara +import ant + +bomfile = open(r"${build.log.dir}/${build.id}_bom.xml") +bom = amara.parse(bomfile) + +for p in bom.bom.content.project: + if (str(p.name).startswith(ant.get_property(r'@{startsWith}'))): + print str(p.name) +bomfile.close() + + + + + + + + + + + + + + + +import amara +import ant +import bomtofile +import ccmutil + +bomfile = open(r"${build.log.dir}/${build.id}_bom.xml") +bom = amara.parse(bomfile) +password = ant.get_property(r'${ccm.user.password}') +session = ccmutil.get_session(ant.get_property(r'${ccm.database}'), ant.get_property(r'${ccm.user.login}'), password, ant.get_property(r'${ccm.engine.host}'), ant.get_property(r'${ccm.database.path}')) +for p in bom.bom.content.project: + if p.name == ant.get_property(r'${ccm.toplevel.project}'): + bomwriter = bomtofile.BOMWriter(session, 'MC', p, ant.get_property(r'${releasenotes.output.dir}')) + bomwriter.writeprojects() + bomwriter.writebaselines() + bomwriter.writetasks() + + if (str(p.name).startswith('IBUSAL')): + bomwriter = bomtofile.BOMWriter(session, 'IBUSAL', p, ant.get_property(r'${releasenotes.output.dir}')) + bomwriter.writeprojects() + bomwriter.writetasks() +session.close() +bomfile.close() + + + + + + + + + + + + + + + + + + + + +import ccm +#check for ccm session leaks +assert (len(ccm.running_sessions()) == 0) + + + + + + + + + + + + + + + + +import ant +import rtfutils +rn = rtfutils.RTFUtils(ant.get_property(r'${releasenotes.output}')) +rn.rtfconvert(ant.get_property(r'${releasenotes.temp.props}'), ant.get_property(r'${releasenotes.temp.props2}')) + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file