diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-06-28 14:34:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-28 14:34:06 +0300 |
commit | 1dd3d0db1d859d13953538ee6e14526ea9d26c60 (patch) | |
tree | 6c94138c18fff296677bb1db3c0d5520b542ec20 /scripts | |
parent | 84e79c903a53f9b8e6979b2eed634d8523e5668a (diff) | |
download | vaadin-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.py | 11 |
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)) |