From ad87eccd5d4ab0406ef5357fb01f55c89a148c06 Mon Sep 17 00:00:00 2001 From: PhilW Date: Sun, 12 Apr 2026 11:00:54 +0100 Subject: [PATCH] rename and rework releases.json for easier management --- VERSION.txt | 2 +- _bin/generate-downloads-json-data.php | 1 + _data/{releases.json => downloads.json} | 41 +++++++++++++++++-------- download/index.html | 27 ++++++++-------- index.html | 2 +- 5 files changed, 44 insertions(+), 29 deletions(-) rename _data/{releases.json => downloads.json} (65%) diff --git a/VERSION.txt b/VERSION.txt index e10a987..463492b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,3 +1,3 @@ --- --- -{{ site.data.releases.stable.version }} \ No newline at end of file +{{ site.data.downloads.stable.packages[0].version }} \ No newline at end of file diff --git a/_bin/generate-downloads-json-data.php b/_bin/generate-downloads-json-data.php index dad65a5..98bd3c2 100755 --- a/_bin/generate-downloads-json-data.php +++ b/_bin/generate-downloads-json-data.php @@ -31,6 +31,7 @@ function generate_data($version, $package_name, $basedir, $filename) return [ 'package' => $package_name, 'url' => "https://github.com/roundcube/roundcubemail/releases/download/{$version}/{$filename}", + 'version' => $version, 'size' => $size, 'checksum' => $sum, ]; diff --git a/_data/releases.json b/_data/downloads.json similarity index 65% rename from _data/releases.json rename to _data/downloads.json index 89d5849..7ff12c5 100644 --- a/_data/releases.json +++ b/_data/downloads.json @@ -1,64 +1,81 @@ { "stable": { - "name": "Stable version", - "version": "1.6.15", - "sources": [ + "title": "Stable version", + "titleVersion": true, + "packages": [ { "package": "Dependent", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcubemail-1.6.15.tar.gz", + "version": "1.6.15", "size": "3.7 MB", "checksum": "9e415d4f6c29a60c9495a614ffeb9e2786601f74093b4a0a2b9cba0c32535efa" }, { "package": "Complete", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcubemail-1.6.15-complete.tar.gz", + "version": "1.6.15", "size": "5.6 MB", "checksum": "48c9f212c77460132491f670abaf440b765c8276268349a690913764d26afbef" }, { "package": "Framework", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcube-framework-1.6.15.tar.gz", + "version": "1.6.15", "size": "1.1 MB", "checksum": "a90770a8b0a17dfe4fe78d98abce1c4219c4c05bb2b6f08178d9cdff587434bf" } ] }, "old-stable": { - "name": "Old stable", - "version": "1.5.3", - "sources": [ + "title": "Old stable", + "titleVersion": true, + "packages": [ ] }, "lts": { - "name": "LTS versions", - "sources": [ + "title": "LTS versions", + "titleVersion": false, + "description": "Long Term Support with low maintenance mode. This means only security updates and rare fixes of serious issues will go into these release branches.", + "packages": [ { - "package": "1.5.15 - Complete", + "package": "Complete", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.5.15/roundcubemail-1.5.15-complete.tar.gz", + "version": "1.5.15", "size": "7.2 MB", "checksum": "ed96857435066e8cedc0dfa7c3965fd89263e69ba4951385f09939a38b938c28" } ] }, "beta": { - "name": "Release candidate", - "version": "1.7-rc6", - "sources": [ + "title": "Beta version", + "titleVersion": true, + "description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.", + "packages": [ + ] + }, + "rc": { + "title": "Release candidate", + "titleVersion": true, + "description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.", + "packages": [ { "package": "Dependent", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcubemail-1.7-rc6.tar.gz", + "version": "1.7-rc6", "size": "4.0 MB", "checksum": "97a2c6fa98d997a5a0689680d73586d3b120e44755704be5c612bcc7f46df75f" }, { "package": "Complete", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcubemail-1.7-rc6-complete.tar.gz", + "version": "1.7-rc6", "size": "6.1 MB", "checksum": "c68a7cf44c2f23adc76b3283aadb09c3d2921bd24efec1e9e14e57927c924265" }, { "package": "Framework", "url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcube-framework-1.7-rc6.tar.gz", + "version": "1.7-rc6", "size": "1.1 MB", "checksum": "4ad67b65f28c4c15a8e16e93f2c6aa4c9ab05191fec796491980a88a1b4d0eff" } diff --git a/download/index.html b/download/index.html index 1bd7f00..42e557d 100644 --- a/download/index.html +++ b/download/index.html @@ -6,21 +6,18 @@ ---

Download your version of Roundcube

-{% for version in site.data.releases %} - {% assign id = version | first %} - {% assign params = version | last %} +{% for downlad in site.data.downloads %} + {% assign id = downlad | first %} + {% assign params = downlad | last %} - {% if params.sources.size == 0 %} + {% if params.packages.size == 0 %} {% continue %} {% endif %} -

{{ params.name }}{% if params.version %} - {{ params.version }}{% endif %}

+

{{ params.title }}{% if params.titleVersion %} - {{ params.packages[0].version }}{% endif %}

- {% if id == "lts" %} -

Long Term Support with low maintenance mode. This means only security updates and rare fixes of serious issues - will go into these release branches.

- {% elsif id == "beta" %} -

We recommend to test beta versions on a separate environment, and don't forget to backup your data before installing.

+ {% if params.description %} +

{{ params.description }}

{% endif %} @@ -33,14 +30,14 @@

{{ params.name }}{% if params.version %} - {{ params.version }

- {% for source in params.sources %} + {% for package in params.packages %} - - - + + + diff --git a/index.html b/index.html index eccbb41..d69dc44 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@
Download - Version {{ site.data.releases.stable.version }} + Version {{ site.data.downloads.stable.packages[0].version }}
{{ source.package }}{% if source.package == "Dependent" %}1{% endif %}{{ source.size }}{% unless params.titleVersion %}{{ package.version }} - {% endunless %}{{ package.package }}{% if package.package == "Dependent" %}1{% endif %}{{ package.size }} - {{ source.checksum }} + {{ package.checksum }}