#coding=UTF-8 from BuildArchetypes import archetypes, getDeploymentContext from BuildDemos import demos import argparse, cgi 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") parser.add_argument("stagingRepo", type=str, help="URL for the staging repository") args = parser.parse_args() content = """ """ content += "\n
Try demos
    " for demo in demos: content += "
  • {demoName}
  • \n".format(url=args.deployUrl, demoName=demo, version=args.version) content += "
Try archetype demos
    " for archetype in archetypes: content += "
  • {demo}
  • \n".format(url=args.deployUrl, demo=archetype, context=getDeploymentContext(archetype, args.version)) content += """
Staging repository
Eclipse Ivy Settings:
""".format(repoUrl=args.stagingRepo)
content += cgi.escape("""	""".format(repoUrl=args.stagingRepo))
content += """
Trac Milestone
Add version {version} to Trac
Staging result page (See test results, pin and tag build and dependencies)
Commands to tag all repositories (warning: do not run as a single script but set variables and check before any push commands - this has not been tested yet and the change IDs are missing)
VERSION={version}

GERRIT_USER=[fill in your gerrit username]
FRAMEWORK_REVISION=[fill in framework revision]
SCREENSHOTS_REVISION=[fill in screenshot repository revision]
ARCHETYPES_REVISION=[fill in maven-integration repository revision]
PLUGIN_REVISION=[fill in maven plug-in repository revision]

git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/vaadin
cd vaadin
git tag -a -m"$VERSION" $VERSION $FRAMEWORK_REVISION
git push --tags
cd ..

git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/vaadin-screenshots
cd vaadin-screenshots
git tag -a -m"$VERSION" $VERSION $SCREENSHOTS_REVISION
git push --tags
cd ..

git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/maven-integration
cd maven-integration
git tag -a -m"$VERSION" $VERSION $ARCHETYPES_REVISION
git push --tags
cd ..

git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/maven-plugin
cd maven-plugin
git tag -a -m"$VERSION" $VERSION $PLUGIN_REVISION
git push --tags
cd ..
""".format(url=args.buildResultUrl, repoUrl=args.stagingRepo, version=args.version) f = open("result/report.html", 'w') f.write(content)