diff --git a/.plano.py b/.plano.py index 18287255..fda5c448 100644 --- a/.plano.py +++ b/.plano.py @@ -135,19 +135,21 @@ def generate_releases(output_file="input/releases/index.md"): _update_release_data() - releases = read_json("data/releases.json") - latest_release_version = releases["latest_release"]["version"] + releases = read_json("input/data/releases.json") + latest_version = releases["latest"]["version"] out = list() - for release in releases["releases"]: + def sort(release): + return parse_timestamp(release["date"]) + + for release in sorted(releases.values(), key=sort, reverse=True): version = release["version"] + url = release["github_url"] + date = parse_timestamp(release["date"]) - if version == latest_release_version: + if version == latest_version: continue - url = release["url"] - date = parse_timestamp(release["date"]) - out.append(f"* [{version}]({url}) - {date.day} {date.strftime('%B %Y')}") releases = "\n".join(out) @@ -164,27 +166,25 @@ def _update_release_data(): latest_release_tag = latest_release["tag_name"] - data["latest_release"] = { + data["latest"] = { "version": latest_release_tag, - "url": "https://github.com/skupperproject/skupper/releases/tag/{latest_release_tag}", + "github_url": f"https://github.com/skupperproject/skupper/releases/tag/{latest_release_tag}", "date": latest_release["published_at"], } - data["releases"] = list() - for release in releases: if release["prerelease"] or release["draft"]: continue release_tag = release["tag_name"] - data["releases"].append({ + data[release_tag] = { "version": release_tag, - "url": f"https://github.com/skupperproject/skupper/releases/tag/{release_tag}", + "github_url": f"https://github.com/skupperproject/skupper/releases/tag/{release_tag}", "date": release["published_at"], - }) + } - write_json("data/releases.json", data) + write_json("input/data/releases.json", data) @command def test(): diff --git a/README.md b/README.md index 9732cdc5..c666e675 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,10 @@ The process of publishing these docs to the Skupper website uses ## Updating the site for new Skupper releases -Run the `generate-releases` command: +The `generate-releases` command fetches release data from GitHub and +updates the site for new releases. ~~~ console ./plano generate-releases ./plano render --force ~~~ - -This fetches release data from GitHub and updates the site for new -releases. diff --git a/config/config.py b/config/config.py index 113d6a3a..24c94918 100644 --- a/config/config.py +++ b/config/config.py @@ -15,7 +15,7 @@ def _parse_timestamp(timestamp, format="%Y-%m-%dT%H:%M:%SZ"): return dt -_latest_release = read_json("data/releases.json")["latest_release"] +_latest_release = read_json("input/data/releases.json")["latest"] _latest_release_date = _parse_timestamp(_latest_release["date"]) skupper_release = _latest_release["version"] diff --git a/data/releases.json b/data/releases.json deleted file mode 100644 index 6d5f150d..00000000 --- a/data/releases.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "latest_release": { - "date": "2023-12-06T13:33:03Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/{latest_release_tag}", - "version": "1.5.1" - }, - "releases": [ - { - "date": "2023-12-06T13:33:03Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.5.1", - "version": "1.5.1" - }, - { - "date": "2023-11-15T13:40:57Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.4.4", - "version": "1.4.4" - }, - { - "date": "2023-11-10T16:53:30Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.5.0", - "version": "1.5.0" - }, - { - "date": "2023-09-20T13:34:04Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.4.3", - "version": "1.4.3" - }, - { - "date": "2023-08-29T17:16:50Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.8", - "version": "1.2.8" - }, - { - "date": "2023-07-19T16:44:39Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.4.2", - "version": "1.4.2" - }, - { - "date": "2023-07-05T21:19:06Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.7", - "version": "1.2.7" - }, - { - "date": "2023-06-21T12:40:46Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.4.1", - "version": "1.4.1" - }, - { - "date": "2023-05-04T17:18:00Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.6", - "version": "1.2.6" - }, - { - "date": "2023-03-27T13:33:24Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.5", - "version": "1.2.5" - }, - { - "date": "2023-03-10T13:11:11Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.3.0", - "version": "1.3.0" - }, - { - "date": "2023-03-09T18:20:04Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.4", - "version": "1.2.4" - }, - { - "date": "2023-02-08T18:07:43Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.3", - "version": "1.2.3" - }, - { - "date": "2023-01-18T13:07:26Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.2", - "version": "1.2.2" - }, - { - "date": "2023-01-11T15:20:31Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.1", - "version": "1.2.1" - }, - { - "date": "2022-11-14T13:43:16Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.2.0", - "version": "1.2.0" - }, - { - "date": "2022-10-07T07:18:35Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.1.1", - "version": "1.1.1" - }, - { - "date": "2022-10-03T08:27:46Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.1.0", - "version": "1.1.0" - }, - { - "date": "2022-06-14T12:09:52Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.0.2", - "version": "1.0.2" - }, - { - "date": "2022-06-02T19:33:18Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.0.1", - "version": "1.0.1" - }, - { - "date": "2022-05-10T08:49:42Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/1.0.0", - "version": "1.0.0" - }, - { - "date": "2022-03-09T16:43:11Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.7", - "version": "0.8.7" - }, - { - "date": "2022-02-09T14:03:44Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.6", - "version": "0.8.6" - }, - { - "date": "2022-01-10T17:47:30Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.5", - "version": "0.8.5" - }, - { - "date": "2021-12-17T16:49:20Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.4", - "version": "0.8.4" - }, - { - "date": "2021-11-19T15:54:40Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.3", - "version": "0.8.3" - }, - { - "date": "2021-11-18T14:22:21Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.2", - "version": "0.8.2" - }, - { - "date": "2021-11-02T21:28:19Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.1", - "version": "0.8.1" - }, - { - "date": "2021-10-20T11:58:12Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.8.0", - "version": "0.8.0" - }, - { - "date": "2021-07-30T18:43:42Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.7.0", - "version": "0.7.0" - }, - { - "date": "2021-05-20T13:54:06Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.6.0", - "version": "0.6.0" - }, - { - "date": "2021-04-01T15:18:13Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.5.3", - "version": "0.5.3" - }, - { - "date": "2021-03-30T09:28:08Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.5.2", - "version": "0.5.2" - }, - { - "date": "2021-03-24T15:35:40Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.5.1", - "version": "0.5.1" - }, - { - "date": "2021-03-12T08:57:33Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.5.0", - "version": "0.5.0" - }, - { - "date": "2021-01-19T18:00:54Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.4.2", - "version": "0.4.2" - }, - { - "date": "2020-12-09T22:19:06Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.4.0", - "version": "0.4.0" - }, - { - "date": "2020-07-22T16:55:51Z", - "url": "https://github.com/skupperproject/skupper/releases/tag/0.3.0", - "version": "0.3.0" - } - ] -} \ No newline at end of file diff --git a/docs/data/releases.json b/docs/data/releases.json new file mode 100644 index 00000000..bb6c1624 --- /dev/null +++ b/docs/data/releases.json @@ -0,0 +1,197 @@ +{ + "0.3.0": { + "date": "2020-07-22T16:55:51Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.3.0", + "version": "0.3.0" + }, + "0.4.0": { + "date": "2020-12-09T22:19:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.4.0", + "version": "0.4.0" + }, + "0.4.2": { + "date": "2021-01-19T18:00:54Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.4.2", + "version": "0.4.2" + }, + "0.5.0": { + "date": "2021-03-12T08:57:33Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.0", + "version": "0.5.0" + }, + "0.5.1": { + "date": "2021-03-24T15:35:40Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.1", + "version": "0.5.1" + }, + "0.5.2": { + "date": "2021-03-30T09:28:08Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.2", + "version": "0.5.2" + }, + "0.5.3": { + "date": "2021-04-01T15:18:13Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.3", + "version": "0.5.3" + }, + "0.6.0": { + "date": "2021-05-20T13:54:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.6.0", + "version": "0.6.0" + }, + "0.7.0": { + "date": "2021-07-30T18:43:42Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.7.0", + "version": "0.7.0" + }, + "0.8.0": { + "date": "2021-10-20T11:58:12Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.0", + "version": "0.8.0" + }, + "0.8.1": { + "date": "2021-11-02T21:28:19Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.1", + "version": "0.8.1" + }, + "0.8.2": { + "date": "2021-11-18T14:22:21Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.2", + "version": "0.8.2" + }, + "0.8.3": { + "date": "2021-11-19T15:54:40Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.3", + "version": "0.8.3" + }, + "0.8.4": { + "date": "2021-12-17T16:49:20Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.4", + "version": "0.8.4" + }, + "0.8.5": { + "date": "2022-01-10T17:47:30Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.5", + "version": "0.8.5" + }, + "0.8.6": { + "date": "2022-02-09T14:03:44Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.6", + "version": "0.8.6" + }, + "0.8.7": { + "date": "2022-03-09T16:43:11Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.7", + "version": "0.8.7" + }, + "1.0.0": { + "date": "2022-05-10T08:49:42Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.0", + "version": "1.0.0" + }, + "1.0.1": { + "date": "2022-06-02T19:33:18Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.1", + "version": "1.0.1" + }, + "1.0.2": { + "date": "2022-06-14T12:09:52Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.2", + "version": "1.0.2" + }, + "1.1.0": { + "date": "2022-10-03T08:27:46Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.1.0", + "version": "1.1.0" + }, + "1.1.1": { + "date": "2022-10-07T07:18:35Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.1.1", + "version": "1.1.1" + }, + "1.2.0": { + "date": "2022-11-14T13:43:16Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.0", + "version": "1.2.0" + }, + "1.2.1": { + "date": "2023-01-11T15:20:31Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.1", + "version": "1.2.1" + }, + "1.2.2": { + "date": "2023-01-18T13:07:26Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.2", + "version": "1.2.2" + }, + "1.2.3": { + "date": "2023-02-08T18:07:43Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.3", + "version": "1.2.3" + }, + "1.2.4": { + "date": "2023-03-09T18:20:04Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.4", + "version": "1.2.4" + }, + "1.2.5": { + "date": "2023-03-27T13:33:24Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.5", + "version": "1.2.5" + }, + "1.2.6": { + "date": "2023-05-04T17:18:00Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.6", + "version": "1.2.6" + }, + "1.2.7": { + "date": "2023-07-05T21:19:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.7", + "version": "1.2.7" + }, + "1.2.8": { + "date": "2023-08-29T17:16:50Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.8", + "version": "1.2.8" + }, + "1.3.0": { + "date": "2023-03-10T13:11:11Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.3.0", + "version": "1.3.0" + }, + "1.4.1": { + "date": "2023-06-21T12:40:46Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.1", + "version": "1.4.1" + }, + "1.4.2": { + "date": "2023-07-19T16:44:39Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.2", + "version": "1.4.2" + }, + "1.4.3": { + "date": "2023-09-20T13:34:04Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.3", + "version": "1.4.3" + }, + "1.4.4": { + "date": "2023-11-15T13:40:57Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.4", + "version": "1.4.4" + }, + "1.5.0": { + "date": "2023-11-10T16:53:30Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.0", + "version": "1.5.0" + }, + "1.5.1": { + "date": "2023-12-06T13:33:03Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.1", + "version": "1.5.1" + }, + "latest": { + "date": "2023-12-06T13:33:03Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.1", + "version": "1.5.1" + } +} \ No newline at end of file diff --git a/input/data/releases.json b/input/data/releases.json new file mode 100644 index 00000000..bb6c1624 --- /dev/null +++ b/input/data/releases.json @@ -0,0 +1,197 @@ +{ + "0.3.0": { + "date": "2020-07-22T16:55:51Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.3.0", + "version": "0.3.0" + }, + "0.4.0": { + "date": "2020-12-09T22:19:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.4.0", + "version": "0.4.0" + }, + "0.4.2": { + "date": "2021-01-19T18:00:54Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.4.2", + "version": "0.4.2" + }, + "0.5.0": { + "date": "2021-03-12T08:57:33Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.0", + "version": "0.5.0" + }, + "0.5.1": { + "date": "2021-03-24T15:35:40Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.1", + "version": "0.5.1" + }, + "0.5.2": { + "date": "2021-03-30T09:28:08Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.2", + "version": "0.5.2" + }, + "0.5.3": { + "date": "2021-04-01T15:18:13Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.5.3", + "version": "0.5.3" + }, + "0.6.0": { + "date": "2021-05-20T13:54:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.6.0", + "version": "0.6.0" + }, + "0.7.0": { + "date": "2021-07-30T18:43:42Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.7.0", + "version": "0.7.0" + }, + "0.8.0": { + "date": "2021-10-20T11:58:12Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.0", + "version": "0.8.0" + }, + "0.8.1": { + "date": "2021-11-02T21:28:19Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.1", + "version": "0.8.1" + }, + "0.8.2": { + "date": "2021-11-18T14:22:21Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.2", + "version": "0.8.2" + }, + "0.8.3": { + "date": "2021-11-19T15:54:40Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.3", + "version": "0.8.3" + }, + "0.8.4": { + "date": "2021-12-17T16:49:20Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.4", + "version": "0.8.4" + }, + "0.8.5": { + "date": "2022-01-10T17:47:30Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.5", + "version": "0.8.5" + }, + "0.8.6": { + "date": "2022-02-09T14:03:44Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.6", + "version": "0.8.6" + }, + "0.8.7": { + "date": "2022-03-09T16:43:11Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/0.8.7", + "version": "0.8.7" + }, + "1.0.0": { + "date": "2022-05-10T08:49:42Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.0", + "version": "1.0.0" + }, + "1.0.1": { + "date": "2022-06-02T19:33:18Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.1", + "version": "1.0.1" + }, + "1.0.2": { + "date": "2022-06-14T12:09:52Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.0.2", + "version": "1.0.2" + }, + "1.1.0": { + "date": "2022-10-03T08:27:46Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.1.0", + "version": "1.1.0" + }, + "1.1.1": { + "date": "2022-10-07T07:18:35Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.1.1", + "version": "1.1.1" + }, + "1.2.0": { + "date": "2022-11-14T13:43:16Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.0", + "version": "1.2.0" + }, + "1.2.1": { + "date": "2023-01-11T15:20:31Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.1", + "version": "1.2.1" + }, + "1.2.2": { + "date": "2023-01-18T13:07:26Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.2", + "version": "1.2.2" + }, + "1.2.3": { + "date": "2023-02-08T18:07:43Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.3", + "version": "1.2.3" + }, + "1.2.4": { + "date": "2023-03-09T18:20:04Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.4", + "version": "1.2.4" + }, + "1.2.5": { + "date": "2023-03-27T13:33:24Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.5", + "version": "1.2.5" + }, + "1.2.6": { + "date": "2023-05-04T17:18:00Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.6", + "version": "1.2.6" + }, + "1.2.7": { + "date": "2023-07-05T21:19:06Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.7", + "version": "1.2.7" + }, + "1.2.8": { + "date": "2023-08-29T17:16:50Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.2.8", + "version": "1.2.8" + }, + "1.3.0": { + "date": "2023-03-10T13:11:11Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.3.0", + "version": "1.3.0" + }, + "1.4.1": { + "date": "2023-06-21T12:40:46Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.1", + "version": "1.4.1" + }, + "1.4.2": { + "date": "2023-07-19T16:44:39Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.2", + "version": "1.4.2" + }, + "1.4.3": { + "date": "2023-09-20T13:34:04Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.3", + "version": "1.4.3" + }, + "1.4.4": { + "date": "2023-11-15T13:40:57Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.4.4", + "version": "1.4.4" + }, + "1.5.0": { + "date": "2023-11-10T16:53:30Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.0", + "version": "1.5.0" + }, + "1.5.1": { + "date": "2023-12-06T13:33:03Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.1", + "version": "1.5.1" + }, + "latest": { + "date": "2023-12-06T13:33:03Z", + "github_url": "https://github.com/skupperproject/skupper/releases/tag/1.5.1", + "version": "1.5.1" + } +} \ No newline at end of file