Skip to content

Commit

Permalink
Generate an index file for DevTools to fetch release notes from (flut…
Browse files Browse the repository at this point in the history
…ter#10099)

The file would be located at
`https://docs.flutter.dev/f/devtools-releases.json`. The generated file
currently looks like:

```json
{
  "latest": "2.31.0",
  "releases": {
    "2.31.0": "/tools/devtools/release-notes/release-notes-2.31.0-src.md",
    "2.30.0": "/tools/devtools/release-notes/release-notes-2.30.0-src.md",
    "2.29.0": "/tools/devtools/release-notes/release-notes-2.29.0-src.md",
    "2.28.5": "/tools/devtools/release-notes/release-notes-2.28.5-src.md",
    // ... Remaining entries
  }
}
```

I included the full path as it makes it easier for us to migrate their
location in the future, but if you think it's not necessary, let me
know. Then I can just include a list rather than a map.

I'm open to suggestions on the file location, JSON format, and/or
information contained :)

---

Contributes to flutter/devtools#7114

_As follow-up once migrated away from Jekyll, I will also use this file
to generate the page files._
  • Loading branch information
parlough authored Jan 31, 2024
1 parent 6117f6a commit 70b2cea
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
33 changes: 33 additions & 0 deletions src/_data/devtools_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# When adding the release notes for a new DevTools release,
# make sure to add the version number as an entry in this list.
# This step might be eliminated in the future.
releases:
- '2.31.0'
- '2.30.0'
- '2.29.0'
- '2.28.5'
- '2.28.4'
- '2.28.3'
- '2.27.0'
- '2.26.1'
- '2.25.0'
- '2.24.0'
- '2.23.1'
- '2.22.2'
- '2.21.1'
- '2.20.0'
- '2.19.0'
- '2.18.0'
- '2.17.0'
- '2.16.0'
- '2.15.0'
- '2.14.0'
- '2.13.1'
- '2.12.2'
- '2.12.1'
- '2.11.2'
- '2.10.0'
- '2.9.2'
- '2.9.1'
- '2.8.0'
- '2.7.0'
68 changes: 10 additions & 58 deletions src/tools/devtools/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,14 @@ $ dart devtools --version

### Release notes

* [2.31.0 release notes][]
* [2.30.0 release notes][]
* [2.29.0 release notes][]
* [2.28.5 release notes][]
* [2.28.4 release notes][]
* [2.28.3 release notes][]
* [2.28.2 release notes][]
* [2.28.1 release notes][]
* [2.27.0 release notes][]
* [2.26.1 release notes][]
* [2.25.0 release notes][]
* [2.24.0 release notes][]
* [2.23.1 release notes][]
* [2.22.2 release notes][]
* [2.21.1 release notes][]
* [2.20.0 release notes][]
* [2.18.0 release notes][]
* [2.17.0 release notes][]
* [2.16.0 release notes][]
* [2.15.0 release notes][]
* [2.14.0 release notes][]
* [2.13.1 release notes][]
* [2.12.1 release notes][]
* [2.11.2 release notes][]
* [2.10.0 release notes][]
* [2.9.2 release notes][]
* [2.9.1 release notes][]
* [2.8.0 release notes][]
* [2.7.0 release notes][]
{% comment %}
When adding the release notes for a new DevTools release,
make sure to add the version number as an entry to the list
found at `/src/_data/devtools_releases.yml`.
{% endcomment -%}

[2.31.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.31.0
[2.30.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.30.0
[2.29.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.29.0
[2.28.5 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.28.5
[2.28.4 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.28.4
[2.28.3 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.28.3
[2.28.2 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.28.2
[2.28.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.28.1
[2.27.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.27.0
[2.26.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.26.1
[2.25.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.25.0
[2.24.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.24.0
[2.23.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.23.1
[2.22.2 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.22.2
[2.21.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.21.1
[2.20.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.20.0
[2.18.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.18.0
[2.17.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.17.0
[2.16.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.16.0
[2.15.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.15.0
[2.14.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.14.0
[2.13.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.13.1
[2.12.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.12.1
[2.11.2 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.11.2
[2.10.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.10.0
[2.9.2 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.9.2
[2.9.1 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.9.1
[2.8.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.8.0
[2.7.0 release notes]: {{site.url}}/tools/devtools/release-notes/release-notes-2.7.0
{% assign releases = site.data.devtools_releases.releases %}

{% for release in releases -%}
* [{{release}} release notes]({{site.url}}/tools/devtools/release-notes/release-notes-{{release}})
{% endfor -%}
15 changes: 15 additions & 0 deletions src/tools/devtools/release-notes/releases.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
permalink: /f/devtools-releases.json
layout: none
---

{%- assign releases = site.data.devtools_releases.releases -%}
{%- assign latest = releases | first -%}
{
"latest": "{{latest}}",
"releases": {
{%- for release in releases %}
"{{release}}": "/tools/devtools/release-notes/release-notes-{{release}}-src.md"{%- unless forloop.last -%},{%- endunless -%}
{%- endfor %}
}
}

0 comments on commit 70b2cea

Please sign in to comment.