Skip to content

Commit 3b16486

Browse files
committed
Add changelog to brain updates
1 parent 0be9bb7 commit 3b16486

File tree

6 files changed

+25
-31
lines changed

6 files changed

+25
-31
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ task :validate_kit_versions do
4141
data = YAML.load_file('_data/kit_versions.yml')
4242
data.each do |entry|
4343
actual = entry.keys.to_set
44-
expected = ['version', 'released'].to_set
44+
expected = ['version', 'released', 'changelog'].to_set
4545
missing = expected - actual
4646
extra = actual - expected
4747
messages = []

_data/kit_versions.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
# The format of this file should be like such:
33
# - version: 20xx.y.z
44
# released: 2038-01-19
5+
# changelog:
6+
# - Changed something
7+
# - Changed another thing too
58
- version: 2023.0.0
6-
released: 2022-10-21
9+
released: 2022-10-21
10+
changelog:
11+
- Initial release for SR2023.

_includes/updates-list.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% for kit_version in site.data.kit_versions %}
2+
{% assign version = kit_version.version %}
3+
{% if forloop.first %}
4+
<h2><code><strong>{{ version }}</strong> ({{ kit_version.released | date_to_string }})</code> </h2>
5+
{% else %}
6+
<h2><code>{{ version }} ({{ kit_version.released | date_to_string }})</code></h2>
7+
{% endif %}
8+
<a class="kit-download-link" data-version="{{ version }}" href="https://github.com/srobo/robot-image/releases/download/v{{ version }}/srobo-image-robot-{{ version }}.img.xz">
9+
Download {{ version }}
10+
</a>
11+
<ul>
12+
{% for log in kit_version.changelog %}
13+
<li>{{log }}</li>
14+
{% endfor %}
15+
</ul>
16+
{% endfor %}

_includes/updates-table.html

Lines changed: 0 additions & 25 deletions
This file was deleted.

js/updates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function handleDownloadClick(event) {
99
}
1010

1111
function addDownloadTracking() {
12-
document.querySelectorAll("#updates-table .kit-download-link").forEach(function(link) {
12+
document.querySelectorAll(".kit-download-link").forEach(function(link) {
1313
link.addEventListener("click", handleDownloadClick);
1414
});
1515
}

kit/brain_board/updates.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ Once you have downloaded the file you need, refer to the documentation on [updat
1313
Each update file is a complete upgrade. Each file contains the changes of those before it. If you need to jump up multiple versions, you can do so by using the latest file.
1414

1515
{% if site.data.kit_versions.size > 0 %}
16-
The following table outlines the updates which have been published.
17-
18-
{% include updates-table.html %}
16+
{% include updates-list.html %}
1917
{% else %}
2018
There are currently no updates available.
2119
{% endif %}

0 commit comments

Comments
 (0)