summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-06-28 14:34:06 +0300
committerGitHub <noreply@github.com>2018-06-28 14:34:06 +0300
commit1dd3d0db1d859d13953538ee6e14526ea9d26c60 (patch)
tree6c94138c18fff296677bb1db3c0d5520b542ec20 /scripts
parent84e79c903a53f9b8e6979b2eed634d8523e5668a (diff)
downloadvaadin-framework-1dd3d0db1d859d13953538ee6e14526ea9d26c60.tar.gz
vaadin-framework-1dd3d0db1d859d13953538ee6e14526ea9d26c60.zip
Improve version number test for publish report script (#11007)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/GeneratePublishReportPart1.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/GeneratePublishReportPart1.py b/scripts/GeneratePublishReportPart1.py
index 37b2f8e409..737f8d675e 100644
--- a/scripts/GeneratePublishReportPart1.py
+++ b/scripts/GeneratePublishReportPart1.py
@@ -14,8 +14,6 @@ metadataChecks = {
'https://vaadin.com/download/VERSIONS_7': '^7\..*',
'https://vaadin.com/download/release/7.7/LATEST': '^7\..*',
'https://vaadin.com/download/LATEST': '^6\..*',
- 'https://vaadin.com/download/LATEST8': '^8\.1\..*',
- 'https://vaadin.com/download/PRERELEASES': '^{ver}'
}
parser = argparse.ArgumentParser(description="Post-publish report generator")
@@ -37,10 +35,15 @@ elif not isdir(resultPath):
print("Result path is not a directory.")
sys.exit(1)
+# Latest 8 checks based on current version number.
(major, minor, maintenance) = args.version.split(".", 2)
prerelease = "." in maintenance
if prerelease:
maintenance = maintenance.split('.')[0]
+ metadataChecks['https://vaadin.com/download/PRERELEASES'] = '^{ver}'
+ metadataChecks['https://vaadin.com/download/LATEST8'] = '^%d\.%d\..*' % (int(major), int(minor) - 1)
+else:
+ metadataChecks['https://vaadin.com/download/LATEST8'] = '^{ver}'
def checkUrlContents(url, regexp):
r = requests.get(url)
@@ -52,7 +55,9 @@ def checkUrlStatus(url):
metadataOk = True
for url in metadataChecks:
- metadataOk = metadataOk and checkUrlContents(url, metadataChecks[url].format(ver=args.version))
+ pattern = metadataChecks[url].format(ver=args.version)
+ print("Checking: %s with pattern %s" % (url, pattern))
+ metadataOk = metadataOk and checkUrlContents(url, pattern)
tagOk = checkUrlStatus("https://github.com/vaadin/framework/releases/tag/{ver}".format(ver=args.version))