]> granicus.if.org Git - graphviz/commitdiff
fail deployment if a release exceeds 50 artifacts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Nov 2021 01:20:45 +0000 (17:20 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Nov 2021 05:54:45 +0000 (21:54 -0800)
Following commit 0155cabbb7b22494b3d5da1425059387d8236cf2, the number of
artifacts produced during packaging is down to 40. We expect this count to rise
as the CMake build system continues to be worked on, operating systems move in
and out of support cycles, and the Cygwin/Msys builds are tweaked. This change
introduced a safe guard to fail deployment if the number of artifacts grows to
exceed 50 again.

Related to #2147.

ci/deploy.py

index ef83783551dd6efa011e4f62e547c9bced58d20b..8e0d4f5009f743de49beacdea44c06bf027fe840 100644 (file)
@@ -195,6 +195,12 @@ def main(args: List[str]) -> int: # pylint: disable=missing-function-docstring
         for c in checksum(path):
           assets.append(upload(package_version, c, str(c)[len("Packages/"):]))
 
+  # various release pages truncate the viewable artifacts to 100 or even 50
+  if not options.force and len(assets) > 50:
+    log.error(f"upload has {len(assets)} assets, which will result in some of "
+              "them being unviewable in web page lists")
+    return -1
+
   # we only create Gitlab releases for stable version numbers
   if not options.force:
     if re.match(r"\d+\.\d+\.\d+$", options.version) is None: