From d8f6138936448576f27a7cc0eca9bd47e8fb5b36 Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Sep 29 2020 00:50:51 +0000 Subject: attempts at IoT beta links Signed-off-by: Rick Elrod --- diff --git a/sites/getfedora.org/main.py b/sites/getfedora.org/main.py index e36f346..f902d4d 100644 --- a/sites/getfedora.org/main.py +++ b/sites/getfedora.org/main.py @@ -242,14 +242,21 @@ export_route('iot', '/iot/') # Handle this route specially because of how it does links, but still use # export_route so i18n magic works. -iot_links = iot_compose_links(r['ga']['editions']['iot']['release_number']) -export_route('iot_download', '/iot/download/', context={'iot_links': iot_links}) -iot_checksums = iot_links['checksums'] -export_route('security', '/security/', context={'iot_checksums': iot_checksums}) +iot_ctx = {} +iot_ctx['ga'] = iot_compose_links(r['ga']['editions']['iot']['release_number']) +if r['beta']['show']: + # Best-effort attempt to show beta links. If beta.show and the metadata file + # was able to be decoded, we add it. Otherwise we don't. + iot_beta = iot_compose_links( + r['beta']['editions']['iot']['release_number'], + beta=True) + if iot_beta: + iot_ctx['beta'] = iot_beta +export_route('iot_download', '/iot/download/', context={'iot': iot_ctx}) +export_route('security', '/security/', context={'iot': iot_ctx}) export_route('sponsors', '/sponsors/') - # This is manually updated for now by calling: # python scripts/releases-json.py > static/releases.json @app.route('/releases.json') diff --git a/sites/getfedora.org/release.yaml b/sites/getfedora.org/release.yaml index 897311c..d9f0db6 100644 --- a/sites/getfedora.org/release.yaml +++ b/sites/getfedora.org/release.yaml @@ -33,6 +33,10 @@ ga: iot: pretty_name: Fedora IoT release_number: 32 + # These can change, so we have to generate them dynamically at build time. + # We do this in util.iot_compose, and use [] here to not show them on the + # security page. + checksum_arches: [] beta: # Should we show the beta stuff at all? @@ -67,6 +71,14 @@ beta: netinst_aarch64: default raw_aarch64: default + iot: + pretty_name: Fedora IoT + release_number: 33 + # These can change, so we have to generate them dynamically at build time. + # We do this in util.iot_compose, and use [] here to not show them on the + # security page. + checksum_arches: [] + fmw: osx: version: 4.1.5 diff --git a/sites/getfedora.org/site/iot/download/index.html b/sites/getfedora.org/site/iot/download/index.html index a3937b6..cacb0d2 100644 --- a/sites/getfedora.org/site/iot/download/index.html +++ b/sites/getfedora.org/site/iot/download/index.html @@ -11,6 +11,18 @@

{% trans trimmed %}Download Fedora IoT.{% endtrans %}

{% trans trimmed %}Download the latest version of Fedora IoT Edition for your architecture here.{% endtrans %}
+ +

+ + + Latest release: {{ iot['ga']['date'] }} + {% if releaseinfo.beta.show and 'beta' in iot %} + · beta: {{ iot['beta']['date'] }} + {% endif %} + + +

+
@@ -21,7 +33,7 @@

Raw Images:

 
    - {% for key, value in iot_links['type']['raw-xz'].items() %} + {% for key, value in iot['ga']['type']['raw-xz'].items() %}
  • {% trans trimmed n=releaseinfo.ga.editions.iot.release_number %} @@ -35,13 +47,30 @@
  • {% endfor %} + + {% if releaseinfo.beta.show and 'beta' in iot %} + {% for key, value in iot['beta']['type']['raw-xz'].items() %} +
  • +
    + {% trans trimmed n=releaseinfo.beta.editions.iot.release_number %} + Fedora {{n}}: Raw Image for {{key}} + {% endtrans %} + {% trans trimmed %}Beta!{% endtrans %} +
    + +
  • + {% endfor %} + {% endif %}
-

Latest release: {{iot_links['date']}}

Installer ISOs:

 
    - {% for key, value in iot_links['type']['dvd-ostree'].items() %} + {% for key, value in iot['ga']['type']['dvd-ostree'].items() %}
  • {% trans trimmed n=releaseinfo.ga.editions.iot.release_number %} @@ -55,8 +84,25 @@
  • {% endfor %} + + {% if releaseinfo.beta.show and 'beta' in iot %} + {% for key, value in iot['beta']['type']['dvd-ostree'].items() %} +
  • +
    + {% trans trimmed n=releaseinfo.beta.editions.iot.release_number %} + Fedora {{n}}: Installer ISO for {{key}} + {% endtrans %} + {% trans trimmed %}Beta!{% endtrans %} +
    + +
  • + {% endfor %} + {% endif %}
-

Latest release: {{iot_links['date']}}

diff --git a/sites/getfedora.org/site/security/index.html b/sites/getfedora.org/site/security/index.html index c472ded..4062fdd 100644 --- a/sites/getfedora.org/site/security/index.html +++ b/sites/getfedora.org/site/security/index.html @@ -68,7 +68,7 @@ {% endfor %} {% if releaseinfo.beta.show %}
- {% for edition in releaseinfo.beta.editions %} + {% for edition, data in releaseinfo.beta.editions.items() if data.get('checksum_arches', []) %}
{{releaseinfo.beta.editions[edition].pretty_name}}