From 34a5ac389844c311e2218321f7fcd8ecb29a365b Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 27 Jun 2024 17:00:14 +0200 Subject: [PATCH 1/2] UI: Hide stable and release candidate builds They were exposed mainly so release maintainers could keep an eye on them. This is no longer necessary since we have an API for it at: `/?format=json&v=1` e.g. https://builder.blender.org/download/daily/?format=json&v=1 Hide these in all environments (LOCAL, UATEST, and PROD). --- source/BuildsRenderer.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/source/BuildsRenderer.php b/source/BuildsRenderer.php index 7794e2a..b8043f4 100644 --- a/source/BuildsRenderer.php +++ b/source/BuildsRenderer.php @@ -122,6 +122,8 @@ class BuildsRenderer { $build_configuration = $build->build_configuration; $branch = $build->branch; $patch = $build->patch; + $is_release_stable = BuildReleaseCycle::STABLE == $build->release_cycle; + $is_release_candidate = BuildReleaseCycle::CANDIDATE == $build->release_cycle; if (!isVisibleBuild($build)) { continue; @@ -153,14 +155,7 @@ class BuildsRenderer { $analytics_event_os = $browser_platform; $analytics_classes = 'plausible-event-name=' . $analytics_event_name . ' plausible-event-os=' . $analytics_event_os . ' plausible-event-build=' . $analytics_event_build . ''; - $needs_hidden = in_array($file_extension, array("sha256")); - - $env_id = getEnvId(); - if (in_array($env_id, array("UATEST", "PROD"))) { - if (BuildReleaseCycle::STABLE != $build->release_cycle) { - $needs_hidden = in_array($file_extension, array("msi", "msix", "sha256")); - } - } + $needs_hidden = (in_array($file_extension, array("msi", "msix", "sha256")) or ($is_release_stable) or ($is_release_candidate)); $display_style = ""; if ($needs_hidden) -- 2.30.2 From 9489f8a42b7afcd609b93ae8f0209d029abc10f3 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 27 Jun 2024 19:03:02 +0200 Subject: [PATCH 2/2] Do not hide release candidate builds --- source/BuildsRenderer.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/BuildsRenderer.php b/source/BuildsRenderer.php index b8043f4..cf1b384 100644 --- a/source/BuildsRenderer.php +++ b/source/BuildsRenderer.php @@ -122,8 +122,6 @@ class BuildsRenderer { $build_configuration = $build->build_configuration; $branch = $build->branch; $patch = $build->patch; - $is_release_stable = BuildReleaseCycle::STABLE == $build->release_cycle; - $is_release_candidate = BuildReleaseCycle::CANDIDATE == $build->release_cycle; if (!isVisibleBuild($build)) { continue; @@ -155,11 +153,12 @@ class BuildsRenderer { $analytics_event_os = $browser_platform; $analytics_classes = 'plausible-event-name=' . $analytics_event_name . ' plausible-event-os=' . $analytics_event_os . ' plausible-event-build=' . $analytics_event_build . ''; - $needs_hidden = (in_array($file_extension, array("msi", "msix", "sha256")) or ($is_release_stable) or ($is_release_candidate)); + /* Hide certain items from the UI. */ + $is_release_stable = BuildReleaseCycle::STABLE == $build->release_cycle; + $needs_hidden = (in_array($file_extension, array("msi", "msix", "sha256")) or ($is_release_stable)); $display_style = ""; - if ($needs_hidden) - { + if ($needs_hidden) { $display_style = 'style="display:none;"'; } -- 2.30.2