diff options
author | Henri Sara <henri.sara@gmail.com> | 2016-12-20 10:40:31 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2016-12-20 10:40:31 +0200 |
commit | c76f217ff0fc09b8bd4ab4645b416ed3e55d93f8 (patch) | |
tree | b1fbf51725c5b5e9702e4490f4cb08c039704609 /scripts/GeneratePostPublishReport.py | |
parent | 54df589b2006587798748fe1502af44b1f7fd831 (diff) | |
download | vaadin-framework-c76f217ff0fc09b8bd4ab4645b416ed3e55d93f8.tar.gz vaadin-framework-c76f217ff0fc09b8bd4ab4645b416ed3e55d93f8.zip |
Update build report for GitHub and removed widgets module (#8037)
Diffstat (limited to 'scripts/GeneratePostPublishReport.py')
-rw-r--r-- | scripts/GeneratePostPublishReport.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/GeneratePostPublishReport.py b/scripts/GeneratePostPublishReport.py index a8fbbb705f..c496debb61 100644 --- a/scripts/GeneratePostPublishReport.py +++ b/scripts/GeneratePostPublishReport.py @@ -13,6 +13,10 @@ buildResultUrl = "http://{}/viewLog.html?buildId={}&tab=buildResultsDiv&buildTyp (major, minor, maintenance) = args.version.split(".", 2) prerelease = "." in maintenance +def checkUrlStatus(url): + r = requests.get(url) + return r.status_code == 200 + def createTableRow(*columns): html = "<tr>" for column in columns: @@ -21,13 +25,13 @@ def createTableRow(*columns): traffic_light = "<svg width=\"20px\" height=\"20px\" style=\"padding-right:5px\"><circle cx=\"10\" cy=\"10\" r=\"10\" fill=\"{color}\"/></svg>" -content = "<html><head></head><body><table>" +def getTrafficLight(b): + return traffic_light.format(color="green") if b else traffic_light.format(color="red") -# Batch update tickets in trac -content += createTableRow("", "<a href=\"https://dev.vaadin.com/query?status=pending-release&component=Core+Framework&resolution=fixed&milestone=Vaadin {version}&col=id&col=summary&col=component&col=milestone&col=status&col=type\">Batch update tickets in Trac</a>") +content = "<html><head></head><body><table>" -# Create milestone for next release -content += createTableRow("", "<a href=\"https://dev.vaadin.com/milestone?action=new\">Create milestone for next release</a>") +tagOk = checkUrlStatus("https://github.com/vaadin/framework/releases/tag/{ver}".format(ver=args.version)) +content += createTableRow(getTrafficLight(tagOk), "Tag ok on github.com") # Tag and pin build content += createTableRow("", "<a href=\"{url}\">Tag and pin build</a>".format(url=buildResultUrl)) |