diff --git a/README.md b/README.md index 89eb39b..35261aa 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all |   stable2407-4 | ~2024-11-04 | ~2024-11-07 | | Planned | |   stable2407-5 | ~2024-12-02 | ~2024-12-05 | | Planned | |   (5 more) | | | | | -| **stable2409** |   2024-09-02 | ~2024-09-25 | ~2025-09-25 | [Drafted](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409) | +| **stable2409** |   2024-09-02 | ~2024-09-25 | ~2025-09-25 | [Staging](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409-rc1) | |   stable2409-1 | ~2024-10-14 | ~2024-10-17 | | Planned | |   stable2409-2 | ~2024-11-11 | ~2024-11-14 | | Planned | |   stable2409-3 | ~2024-12-09 | ~2024-12-12 | | Planned | diff --git a/badges/polkadot-sdk-latest.svg b/badges/polkadot-sdk-latest.svg index c4ea567..d347cd9 100644 --- a/badges/polkadot-sdk-latest.svg +++ b/badges/polkadot-sdk-latest.svg @@ -1 +1 @@ -Current Stable Release: polkadot 2407 2Current Stable Releasepolkadot 2407 2 \ No newline at end of file +Latest Release: stable2407 2Latest Releasestable2407 2 \ No newline at end of file diff --git a/badges/polkadot-sdk-next.svg b/badges/polkadot-sdk-next.svg index 539665d..d8a2eae 100644 --- a/badges/polkadot-sdk-next.svg +++ b/badges/polkadot-sdk-next.svg @@ -1 +1 @@ -Next Stable Release (polkadot 2409): 2024/09/25Next Stable Release (polkadot 2409)2024/09/25 \ No newline at end of file +Next Release: stable2409 on 2024/09/02Next Releasestable2409 on 2024/09/02 \ No newline at end of file diff --git a/releases-v1.json b/releases-v1.json index 584fd52..b18b7bd 100644 --- a/releases-v1.json +++ b/releases-v1.json @@ -120,10 +120,10 @@ }, { "name": "stable2409", - "state": "drafted", + "state": "staging", "cutoff": { "when": "2024-09-02", - "tag": "polkadot-stable2409" + "tag": "polkadot-stable2409-rc1" }, "publish": { "estimated": "2024-09-25" @@ -402,4 +402,4 @@ ], "changelog": "https://github.com/paritytech/polkadot-sdk/releases/tag/$TAG" } -} \ No newline at end of file +} diff --git a/scripts/manage.py b/scripts/manage.py index ddd96f4..57172c3 100644 --- a/scripts/manage.py +++ b/scripts/manage.py @@ -133,7 +133,7 @@ def update_release(data, version, date, field): return update_patch(release, version.split('-')[1], date, field) else: # It's a release if field == 'cutoff': - release['cutoff'] = { 'when': date, 'tag': f'polkadot-{version}' } + release['cutoff'] = { 'when': date, 'tag': f'polkadot-{version}-rc1' } release['state'] = 'drafted' elif field == 'publish': release['publish'] = {'when': date, 'tag': f'polkadot-{version}'} diff --git a/scripts/update-badges.py b/scripts/update-badges.py index 87618e2..945f5e7 100644 --- a/scripts/update-badges.py +++ b/scripts/update-badges.py @@ -10,11 +10,13 @@ import json import os import requests +import re from datetime import datetime releases = json.load(open("releases-v1.json")) def download(url, filename): + print(f"Downloading {url}") response = requests.get(url) if response.status_code == 200: @@ -27,11 +29,11 @@ def download(url, filename): def update_latest(): recommended = releases["Polkadot SDK"]["recommended"] - latest = recommended['release'].replace('stable', '') + latest = recommended['release'] if 'patch' in recommended: latest += f"_{recommended['patch']}" - latest_url = f"https://img.shields.io/badge/Current%20Stable%20Release-polkadot_{latest}-green" + latest_url = f"https://img.shields.io/badge/Latest%20Release-{latest}-green" latest_name = "badges/polkadot-sdk-latest.svg" download(latest_url, latest_name) @@ -62,17 +64,13 @@ def update_next(): next_release = find_next_unreleased_release(sdk_releases) if next_release: - next_version = next_release['name'].replace('stable', '') cutoff_info = next_release['cutoff'] + date = format_date(cutoff_info) - formatted_date = format_date(cutoff_info) + # extract the 'stableYYMMDD' part + stable = re.search(r'(stable\d+)', next_release['name']).group(1) - if isinstance(cutoff_info, dict) and 'tag' in cutoff_info: - cutoff_tag = cutoff_info['tag'] - else: - cutoff_tag = f"polkadot-{next_release['name']}-cutoff" - - next_url = f"https://img.shields.io/badge/Next%20Stable%20Release%20%28{cutoff_tag}%29-{formatted_date}-orange" + next_url = f"https://img.shields.io/badge/Next%20Release-{stable}%20on%20{date}-orange" next_name = "badges/polkadot-sdk-next.svg" download(next_url, next_name) else: