Skip to content

Commit

Permalink
tinker with esr version
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniehobson committed Aug 7, 2024
1 parent 64a4194 commit 9ec4f2f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
12 changes: 8 additions & 4 deletions bedrock/firefox/templates/firefox/all/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,26 @@ <h2 class="c-step-name{% if not (product and platform and locale) %} t-step-disa
{{ ms_store_button(href=ms_store_href, id='msStoreLink') }}
</p>
{% elif product.slug == "desktop-esr" %}
{% set is_esr_next_version = desktop_esr_next_version %}
{# ESR latest #}
<p class="c-step-download">
ESR Latest:<br>
<a href="{{ download_url }}" id="download-button-primary" class="mzp-c-button mzp-t-product mzp-t-xl c-download-button" data-link-type="download" data-download-location="primary cta">
{{ ftl('download-button-download-now') }} {{ icon_download|safe }}
</a>
</a> {{ desktop_esr_latest_version}}
</p>
{# If there are multiple ESR's available, now next as well. #}
{% set hide_esr_version_select = not desktop_esr_next_version %}
{% if desktop_esr_next_version %}
{# If there are multiple ESR's available, show next as well. #}
{% if is_esr_next_version %}
<p class="c-step-download">
ESR Next:<br>
<a href="{{ download_esr_next_url }}" id="download-button-primary" class="mzp-c-button mzp-t-product mzp-t-xl c-download-button" data-link-type="download" data-download-location="primary cta">
{{ ftl('download-button-download-now') }} {{ icon_download|safe }}
</a>
</p>
<p>When there is a major version update like from 91 ESR to 102 ESR then there is always an overlap of a few Firefox ESR versions to allow admins to test the new version and make sure that there aren't issues with deploying the new version. </p>
<p>The reason there are two ESRs at any time is to provide a substantial double-up period between versions, so you are never stuck with taking on new features just to get security fixes – there’s always an overlap during which you can keep using the old ESR while trying out the new ESR to get ready for the necessary switchover in the future.</p>
<p>The ESR version will also have a three cycle (at least 12 weeks) overlap between the time of a new release and the end-of-life of the previous release to permit testing and certification before you deploy the new version to your organization. </p>
{{ desktop_esr_next_version }}
{% endif %}
{% else %}
<p class="c-step-download">
Expand Down
15 changes: 7 additions & 8 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,10 @@ class MobileRelease:
}

channel_esr_next = "esr_next"
latest_esr_next_version_desktop = firefox_desktop.latest_version(channel_esr_next)
if latest_esr_next_version_desktop:
context["desktop_esr_platforms_next"] = firefox_desktop.platforms(channel_esr_next, True)
context["desktop_esr_full_builds_next"] = firefox_desktop.get_filtered_full_builds(channel_esr_next, latest_esr_next_version_desktop)
context["desktop_esr_channel_label_next"] = (firefox_desktop.channel_labels.get(channel_esr_next, "Firefox"),)
context["desktop_esr_next_version"] = latest_esr_next_version_desktop
esr_next_version = firefox_desktop.latest_version(channel_esr_next)
if esr_next_version:
context["desktop_esr_latest_version"] = firefox_desktop.latest_version("esr")
context["desktop_esr_next_version"] = esr_next_version

# Show download link
if locale:
Expand All @@ -322,9 +320,10 @@ class MobileRelease:
context.update(
download_url=download_url,
)
if latest_esr_next_version_desktop:
if esr_next_version:
# TKTK: this probably needs some kind of saftey around the locale availability
context["download_esr_next_url"] = list(
filter(lambda b: b["locale"] == locale, firefox_desktop.get_filtered_full_builds(channel_esr_next, latest_esr_next_version_desktop))
filter(lambda b: b["locale"] == locale, firefox_desktop.get_filtered_full_builds(channel_esr_next, esr_next_version))
)[0]["platforms"][platform]["download_url"]

# Show platforms with download links
Expand Down

0 comments on commit 9ec4f2f

Please sign in to comment.