From 89f824c769bef41cdcca39b17ed7d41832463455 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 5 Oct 2023 15:23:01 +0000 Subject: [PATCH] update-prod-static: Only run generate_landing_page_images if necessary. The vast majority of deployments do not need landing page assets generated every deploy, which takes more than 15s. This also removes them from built tarballs, which also do not need them. --- tools/update-prod-static | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/update-prod-static b/tools/update-prod-static index 37c490bb61..4aa0b80b21 100755 --- a/tools/update-prod-static +++ b/tools/update-prod-static @@ -42,8 +42,10 @@ run(["./tools/setup/build_pygments_data"]) # Build time zone data run(["./tools/setup/build_timezone_values"]) -# Generate landing page images of various sizes and formats. -run(["tools/setup/generate_landing_page_images.py"]) +# Generate landing page images of various sizes and formats if we will +# need them. +if settings.CORPORATE_ENABLED: + run(["./tools/setup/generate_landing_page_images.py"]) # Create webpack bundle run(["./tools/webpack", "--quiet"])