Skip to content

Commit 3312f21

Browse files
authored
Merge pull request #86 from johndoh/downloads
rename and rework releases.json for easier management
2 parents cf728d2 + ad87ecc commit 3312f21

5 files changed

Lines changed: 44 additions & 29 deletions

File tree

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
---
22
---
3-
{{ site.data.releases.stable.version }}
3+
{{ site.data.downloads.stable.packages[0].version }}

_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
];
Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,81 @@
11
{
22
"stable": {
3-
"name": "Stable version",
4-
"version": "1.6.15",
5-
"sources": [
3+
"title": "Stable version",
4+
"titleVersion": true,
5+
"packages": [
66
{
77
"package": "Dependent",
88
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcubemail-1.6.15.tar.gz",
9+
"version": "1.6.15",
910
"size": "3.7 MB",
1011
"checksum": "9e415d4f6c29a60c9495a614ffeb9e2786601f74093b4a0a2b9cba0c32535efa"
1112
},
1213
{
1314
"package": "Complete",
1415
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcubemail-1.6.15-complete.tar.gz",
16+
"version": "1.6.15",
1517
"size": "5.6 MB",
1618
"checksum": "48c9f212c77460132491f670abaf440b765c8276268349a690913764d26afbef"
1719
},
1820
{
1921
"package": "Framework",
2022
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.6.15/roundcube-framework-1.6.15.tar.gz",
23+
"version": "1.6.15",
2124
"size": "1.1 MB",
2225
"checksum": "a90770a8b0a17dfe4fe78d98abce1c4219c4c05bb2b6f08178d9cdff587434bf"
2326
}
2427
]
2528
},
2629
"old-stable": {
27-
"name": "Old stable",
28-
"version": "1.5.3",
29-
"sources": [
30+
"title": "Old stable",
31+
"titleVersion": true,
32+
"packages": [
3033
]
3134
},
3235
"lts": {
33-
"name": "LTS versions",
34-
"sources": [
36+
"title": "LTS versions",
37+
"titleVersion": false,
38+
"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.",
39+
"packages": [
3540
{
36-
"package": "1.5.15 - Complete",
41+
"package": "Complete",
3742
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.5.15/roundcubemail-1.5.15-complete.tar.gz",
43+
"version": "1.5.15",
3844
"size": "7.2 MB",
3945
"checksum": "ed96857435066e8cedc0dfa7c3965fd89263e69ba4951385f09939a38b938c28"
4046
}
4147
]
4248
},
4349
"beta": {
44-
"name": "Release candidate",
45-
"version": "1.7-rc6",
46-
"sources": [
50+
"title": "Beta version",
51+
"titleVersion": true,
52+
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
53+
"packages": [
54+
]
55+
},
56+
"rc": {
57+
"title": "Release candidate",
58+
"titleVersion": true,
59+
"description": "We recommend to test pre-release versions on a separate environment, and don't forget to backup your data before installing.",
60+
"packages": [
4761
{
4862
"package": "Dependent",
4963
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcubemail-1.7-rc6.tar.gz",
64+
"version": "1.7-rc6",
5065
"size": "4.0 MB",
5166
"checksum": "97a2c6fa98d997a5a0689680d73586d3b120e44755704be5c612bcc7f46df75f"
5267
},
5368
{
5469
"package": "Complete",
5570
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcubemail-1.7-rc6-complete.tar.gz",
71+
"version": "1.7-rc6",
5672
"size": "6.1 MB",
5773
"checksum": "c68a7cf44c2f23adc76b3283aadb09c3d2921bd24efec1e9e14e57927c924265"
5874
},
5975
{
6076
"package": "Framework",
6177
"url": "https://github.com/roundcube/roundcubemail/releases/download/1.7-rc6/roundcube-framework-1.7-rc6.tar.gz",
78+
"version": "1.7-rc6",
6279
"size": "1.1 MB",
6380
"checksum": "4ad67b65f28c4c15a8e16e93f2c6aa4c9ab05191fec796491980a88a1b4d0eff"
6481
}

download/index.html

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@
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 %}
9+
{% for downlad in site.data.downloads %}
10+
{% assign id = downlad | first %}
11+
{% assign params = downlad | last %}
1212

13-
{% if params.sources.size == 0 %}
13+
{% if params.packages.size == 0 %}
1414
{% continue %}
1515
{% endif %}
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>
17+
<h2 id="{{ id }}">{{ params.title }}{% if params.titleVersion %} - {{ params.packages[0].version }}{% endif %} <a class="anchor" href="#{{ id }}" aria-label="Link to this section: {{ params.title }}"></a></h2>
1818

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>
19+
{% if params.description %}
20+
<p class="text-body-secondary mb-1">{{ params.description }}</p>
2421
{% endif %}
2522

2623
<table class="table table-striped download-table">
@@ -33,14 +30,14 @@ <h2 id="{{ id }}">{{ params.name }}{% if params.version %} - {{ params.version }
3330
</tr>
3431
</thead>
3532
<tbody>
36-
{% for source in params.sources %}
33+
{% for package in params.packages %}
3734
<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>
35+
<th class="package fw-normal" scope="row">{% unless params.titleVersion %}{{ package.version }} - {% endunless %}{{ package.package }}{% if package.package == "Dependent" %}<sup><a href="#fn1" class="text-body-secondary">1</a></sup>{% endif %}</th>
36+
<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>
37+
<td class="size text-nowrap">{{ package.size }}</td>
4138
<td class="checksum font-monospace text-nowrap text-center text-lg-start pe-3">
4239
<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>
40+
<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>
4441
</span>
4542
<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>
4643
</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>

0 commit comments

Comments
 (0)