diff --git a/README.md b/README.md index b853059..edee841 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all -| Version | Cutoff | Published | End of Life | State | +| Version | Cutoff | Publish | End of Life | State | |---------|--------|-----------|-------------|-------| | **stable2407** |   2024-04-29 |   2024-04-29 |   2025-04-29 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407) | |   stable2407-1 |   2024-08-14 |   2024-08-15 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-1) | @@ -18,32 +18,30 @@ This repo contains a [releases-v1.json](./releases-v1.json) file that tracks all |   stable2407-3 |   2024-10-10 |   2024-10-10 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-3) | |   stable2407-4 |   2024-11-11 |   2024-11-11 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-4) | |   stable2407-5 |   2024-12-02 |   2024-12-09 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2407-5) | -|   stable2407-6 | ~2025-01-06 | ~2025-01-09 | | Planned | -|   stable2407-7 | ~2025-02-03 | ~2025-02-06 | | Planned | -|   stable2407-8 | ~2025-03-03 | ~2025-03-06 | | Planned | +|   stable2407-6 | 2025-01-06 | 2025-01-09 | | Planned | +|   stable2407-7 | 2025-02-03 | 2025-02-06 | | Planned | +|   stable2407-8 | 2025-03-03 | 2025-03-06 | | Planned | |   (2 more) | | | | | -| **stable2409** |   2024-09-02 |   2024-09-26 | ~2025-09-25 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409) | +| **stable2409** |   2024-09-02 |   2024-09-26 | 2025-09-25 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409) | |   stable2409-1 |   2024-10-21 |   2024-10-21 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409-1) | |   stable2409-2 |   2024-11-14 |   2024-11-14 | | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2409-2) | -|   stable2409-3 | ~2024-12-09 | ~2024-12-12 | | Planned | -|   stable2409-4 | ~2025-01-13 | ~2025-01-16 | | Planned | -|   stable2409-5 | ~2025-02-10 | ~2025-02-13 | | Planned | +|   stable2409-3 | 2024-12-09 | 2024-12-12 | | Planned | +|   stable2409-4 | 2025-01-13 | 2025-01-16 | | Planned | +|   stable2409-5 | 2025-02-10 | 2025-02-13 | | Planned | |   (8 more) | | | | | -| **stable2412** | ~2024-11-06 |   2024-12-17 | ~2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) | -|   stable2412-1 | ~2025-01-20 | ~2025-01-23 | | Planned | -|   stable2412-2 | ~2025-02-17 | ~2025-02-20 | | Planned | -|   stable2412-3 | ~2025-03-17 | ~2025-03-20 | | Planned | +| **stable2412** | 2024-11-06 |   2024-12-17 | 2025-12-16 | [Released](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412) | +|   stable2412-1 | 2025-01-20 | 2025-01-23 | | Planned | +|   stable2412-2 | 2025-02-17 | 2025-02-20 | | Planned | +|   stable2412-3 | 2025-03-17 | 2025-03-20 | | Planned | |   (9 more) | | | | | -| **stable2503** | ~2025-02-17 | ~2025-03-31 | ~2026-03-31 | Planned | -|   stable2503-1 | ~2025-04-28 | ~2025-05-01 | | Planned | -|   stable2503-2 | ~2025-05-26 | ~2025-05-29 | | Planned | -|   stable2503-3 | ~2025-06-23 | ~2025-06-26 | | Planned | +| **stable2503** | 2025-02-17 | 2025-03-31 | 2026-03-31 | Planned | +|   stable2503-1 | 2025-04-28 | 2025-05-01 | | Planned | +|   stable2503-2 | 2025-05-26 | 2025-05-29 | | Planned | +|   stable2503-3 | 2025-06-23 | 2025-06-26 | | Planned | |   (10 more) | | | | | -Dates with `~` are estimates. - ### Subscribe Subscribe to the calendar by adding this iCal link to your Google or Apple calendar: diff --git a/scripts/update-readme.py b/scripts/update-readme.py index 4f85c0e..c12dafe 100644 --- a/scripts/update-readme.py +++ b/scripts/update-readme.py @@ -13,7 +13,7 @@ def format_date(date_info: Any) -> str: if isinstance(date_info, str): return '  ' + date_info elif 'estimated' in date_info: - return '~' + date_info.get('estimated', 'N/A') + return date_info.get('estimated', 'N/A') elif 'when' in date_info: return '  ' + date_info['when'] return 'N/A' @@ -54,12 +54,12 @@ def generate_row(item: Dict[str, Any], is_patch: bool = False, is_recommended: b f"{cutoff} | { publish } | " \ f"{end_of_life if not is_patch else ''} | {state} |" -def generate_markdown_table(data: Dict[str, Any]) -> str: +def generate_markdown_table(data: Dict[str, Any], max_future_patches=3) -> str: project_info = data["Polkadot SDK"] recommended = project_info['recommended'] releases = project_info['releases'] - table = "| Version | Cutoff | Published | End of Life | State |\n" \ + table = "| Version | Cutoff | Publish | End of Life | State |\n" \ "|---------|--------|-----------|-------------|-------|\n" for release in releases: @@ -74,7 +74,7 @@ def generate_markdown_table(data: Dict[str, Any]) -> str: is_patch_planned = isinstance(patch['state'], str) and patch['state'].lower() == 'planned' if is_patch_planned: future_patches += 1 - if future_patches < 4: + if future_patches <= max_future_patches: table += generate_row(patch, is_patch=True, is_recommended=is_recommended_patch, is_planned=is_patch_planned) + '\n' else: table += f"|   ({len(patches) - i} more) | | | | |\n" @@ -103,7 +103,7 @@ def main() -> None: try: with open('releases-v1.json', 'r') as file: json_data = json.load(file) - markdown_table = generate_markdown_table(json_data) + markdown_table = generate_markdown_table(json_data, max_future_patches=3) update_readme(markdown_table) except FileNotFoundError: print("Error: 'releases-v1.json' file not found.")