Skip to content

Commit b2990ba

Browse files
committed
rename and rework releases.json for easier management
1 parent 2585c72 commit b2990ba

File tree

7 files changed

+42
-34
lines changed

7 files changed

+42
-34
lines changed

_bin/generate-downloads-json-data.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function generate_data($version, $package_name, $basedir, $filename)
3131
return [
3232
'package' => $package_name,
3333
'url' => "https://github.com/roundcube/roundcubemail/releases/download/{$version}/{$filename}",
34+
'version' => $version,
3435
'size' => $size,
3536
'checksum' => $sum,
3637
];

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ libs: {
1818
url: 'https://cdn.jsdelivr.net/npm/less@4.2.0/dist/less.min.js',
1919
sri: 'sha384-SlYTcCEsC10TwMfcpGjqd+bWfA2QdB0CInBtPX6erDT3NnEkhX2X3gJ83UyHtXs3'
2020
},
21-
css: '/styles/styles.min.css?v=2024021800',
21+
css: '/styles/styles.min.css?v=2026021500',
2222
bootstrap: {
2323
css: {
2424
url: 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css',
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,76 @@
11
{
22
"stable": {
3-
"name": "Stable version",
4-
"version": "1.6.13",
5-
"sources": [
3+
"title": "Stable",
4+
"packages": [
65
{
76
"package": "Dependent",
87
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.13/roundcubemail-1.6.13.tar.gz",
8+
"version": "1.6.13",
99
"size": "3.7 MB",
1010
"checksum": "1ee6a0877024b6ee73bda5050686487af7bc88301b2af3355a46c4ce8e327180"
1111
},
1212
{
1313
"package": "Complete",
1414
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.13/roundcubemail-1.6.13-complete.tar.gz",
15+
"version": "1.6.13",
1516
"size": "5.6 MB",
1617
"checksum": "bdd1bafe79149a6b63f699fa94e7626189ec60e2c37954de7e84ee685dbbf5bb"
1718
},
1819
{
1920
"package": "Framework",
2021
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.13/roundcube-framework-1.6.13.tar.gz",
22+
"version": "1.6.13",
2123
"size": "1.1 MB",
2224
"checksum": "61a92c3152293f0e8401406e855a57ad8bea5b3f4b647565babe42658bbcddf8"
2325
}
2426
]
2527
},
2628
"old-stable": {
27-
"name": "Old stable",
28-
"version": "1.5.3",
29-
"sources": [
29+
"title": "Old Stable",
30+
"packages": [
3031
]
3132
},
3233
"lts": {
33-
"name": "LTS versions",
34-
"sources": [
34+
"title": "LTS",
35+
"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.",
36+
"packages": [
3537
{
36-
"package": "1.5.13 - Complete",
38+
"package": "Complete",
3739
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.5.13/roundcubemail-1.5.13-complete.tar.gz",
40+
"version": "1.5.13",
3841
"size": "7.2 MB",
3942
"checksum": "37a8309882d782fa0b39d0f6e1efaa443b96e720e9e2c51106fb230926cca2f9"
4043
}
4144
]
4245
},
4346
"beta": {
44-
"name": "Release candidate",
45-
"version": "1.7-rc4",
46-
"sources": [
47+
"title": "Beta",
48+
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
49+
"packages": [
50+
]
51+
},
52+
"rc": {
53+
"title": "Release Candidate",
54+
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
55+
"packages": [
4756
{
4857
"package": "Dependent",
4958
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc4/roundcubemail-1.7-rc4.tar.gz",
59+
"version": "1.7-rc4",
5060
"size": "4.0 MB",
5161
"checksum": "bf148cfd31195fec70e3f285221128a14ace619c61155c6c6f88d0d75edaf776"
5262
},
5363
{
5464
"package": "Complete",
5565
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc4/roundcubemail-1.7-rc4-complete.tar.gz",
66+
"version": "1.7-rc4",
5667
"size": "6.1 MB",
5768
"checksum": "a2a5aa6e0be3a7ab2290f193f233560dd3ef183bd3cd52de415a7b7ac9b6cb1e"
5869
},
5970
{
6071
"package": "Framework",
6172
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc4/roundcube-framework-1.7-rc4.tar.gz",
73+
"version": "1.7-rc4",
6274
"size": "1.1 MB",
6375
"checksum": "9ee4f4d3ce39a72de9dc23aee57fe4579b9c20e37b1b8899df73340f49335697"
6476
}

download/index.html

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,16 @@
66
---
77
<h1>Download your version of Roundcube</h1>
88

9-
{% for version in site.data.releases %}
10-
{% assign id = version | first %}
11-
{% assign params = version | last %}
12-
13-
{% if params.sources.size == 0 %}
9+
{% for downlad in site.data.downloads %}
10+
{% assign id = downlad | first %}
11+
{% assign params = downlad | last %}
12+
{% if params.packages.size == 0 %}
1413
{% continue %}
1514
{% endif %}
15+
<h2 id="{{ id }}">{{ params.title }} <a class="anchor" href="#{{ id }}" aria-label="Link to this section: {{ params.title }}"></a></h2>
1616

17-
<h2 id="{{ id }}">{{ params.name }}{% if params.version %} - {{ params.version }}{% endif %} <a class="anchor" href="#{{ id }}" aria-label="Link to this section: {{ id }}"></a></h2>
18-
19-
{% if id == "lts" %}
20-
<p class="text-body-secondary mb-1">Long Term Support with low maintenance mode. This means only security updates and rare fixes of serious issues
21-
will go into these release branches.</p>
22-
{% elsif id == "beta" %}
23-
<p class="text-body-secondary mb-1">We recommend to test beta versions on a separate environment, and don't forget to backup your data before installing.</p>
17+
{% if params.description %}
18+
<p class="text-body-secondary mb-1">{{ params.description }}</p>
2419
{% endif %}
2520

2621
<table class="table table-striped download-table">
@@ -33,14 +28,14 @@ <h2 id="{{ id }}">{{ params.name }}{% if params.version %} - {{ params.version }
3328
</tr>
3429
</thead>
3530
<tbody>
36-
{% for source in params.sources %}
31+
{% for package in params.packages %}
3732
<tr>
38-
<th class="package fw-normal" scope="row">{{ source.package }}{% if source.package == "Dependent" %}<sup><a href="#fn1" class="text-body-secondary">1</a></sup>{% endif %}</th>
39-
<td class="link text-center text-lg-start"><a href="{{ source.url }}" title="Download now!" class="btn rc-icon btn-rc-download btn-sm"><span>Download</span></a></td>
40-
<td class="size text-nowrap">{{ source.size }}</td>
33+
<th class="package fw-normal" scope="row">{{ package.version }} - {{ package.package }}{% if package.package == "Dependent" %}<sup><a href="#fn1" class="text-body-secondary">1</a></sup>{% endif %}</th>
34+
<td class="link text-center text-lg-start"><a href="{{ package.url }}" title="Download now!" class="btn rc-icon btn-rc-download btn-sm"><span>Download</span></a></td>
35+
<td class="size text-nowrap">{{ package.size }}</td>
4136
<td class="checksum font-monospace text-nowrap text-center text-lg-start pe-3">
4237
<span class="d-none d-lg-inline copy-popover-target">
43-
<span class="copy-target d-block d-lg-inline text-nowrap overflow-auto py-3 py-lg-0">{{ source.checksum }}</span><span class="py-3 py-lg-0"><a class="copy-link" href="#" aria-label="Copy text"></a></span>
38+
<span class="copy-target d-block d-lg-inline text-nowrap overflow-auto py-3 py-lg-0">{{ package.checksum }}</span><span class="py-3 py-lg-0"><a class="copy-link" href="#" aria-label="Copy text"></a></span>
4439
</span>
4540
<a class="d-inline d-lg-none copy-popover-link checksum" href="#" aria-label="SHA-256 checksum" onclick="return false;" data-bs-title="SHA-256 checksum" data-bs-placement="left"></a>
4641
</td>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717
<div class="download text-center d-flex flex-column justify-content-center justify-content-lg-start align-items-center pt-xl-4">
1818
<a href="/download" class="btn rc-icon btn-rc-download btn-lg" title="Download now!">Download</a>
19-
<span class="version text-body-secondary">Version {{ site.data.releases.stable.version }}</span>
19+
<span class="version text-body-secondary">Version {{ site.data.downloads.stable.packages[0].version }}</span>
2020
</div>
2121
</div>
2222
</div>

styles/styles.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,12 @@ div.color-modes > ul.dropdown-menu {
451451

452452
table.download-table {
453453
th.package {
454-
width: 20%;
454+
width: 30%;
455455
}
456456

457457
td.link,
458458
td.size {
459-
width: 15%;
459+
width: 12%;
460460
}
461461

462462
td.checksum {

0 commit comments

Comments
 (0)