#coding=UTF-8 from BuildDemos import demos import argparse, subprocess parser = argparse.ArgumentParser(description="Build report generator") parser.add_argument("version", type=str, help="Vaadin version that was just built") parser.add_argument("deployUrl", type=str, help="Base url of the deployment server") parser.add_argument("buildResultUrl", type=str, help="URL for the build result page") args = parser.parse_args() content = """ """.format(version=args.version) try: p1 = subprocess.Popen(['find', '.', '-name', '*.java'], stdout=subprocess.PIPE) p2 = subprocess.Popen(['xargs', 'egrep', '-n', '@since ?$'], stdin=p1.stdout, stdout=subprocess.PIPE) missing = subprocess.check_output(['egrep', '-v', '/(tests|result)/'], stdin=p2.stdout) content += "\n" % (missing) except subprocess.CalledProcessError as e: if e.returncode == 1: content += "\n" else: raise e content += """
Create milestone for next release
Closed fixed tickets without milestone {version}
Closed tickets with milestone {version}
Pending-release tickets with milestone {version}
Pending-release tickets without milestone
API Diff
Release Notes
Empty @since:
\n
%s
No empty @since
Build result page (See test results, pin and tag build and dependencies)
""".format(url=args.buildResultUrl) f = open("result/report.html", 'w') f.write(content)