Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'deprecated' field for depreacted section generation in image docs #203

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions oci/mock-rock/_releases.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"latest": {
"candidate": {
"target": "283"
"target": "1.0-22.04_candidate"
},
"beta": {
"target": "283"
"target": "latest_candidate"
},
"edge": {
"target": "283"
"target": "latest_beta"
},
"end-of-life": "2025-05-01T00:00:00Z"
},
"1.0-22.04": {
"candidate": {
"target": "283"
"target": "316"
},
"beta": {
"target": "283"
"target": "316"
},
"edge": {
"target": "283"
"target": "316"
},
"end-of-life": "2025-05-01T00:00:00Z"
},
"test": {
"beta": {
"target": "283"
"target": "1.0-22.04_beta"
},
"edge": {
"target": "283"
"target": "test_beta"
},
"end-of-life": "2026-05-01T00:00:00Z"
},
"1.1-22.04": {
"end-of-life": "2025-05-01T00:00:00Z",
"candidate": {
"target": "284"
"target": "317"
},
"beta": {
"target": "284"
"target": "317"
},
"edge": {
"target": "284"
"target": "317"
}
},
"1-22.04": {
"end-of-life": "2025-05-01T00:00:00Z",
"candidate": {
"target": "284"
"target": "317"
},
"beta": {
"target": "284"
"target": "317"
},
"edge": {
"target": "284"
"target": "317"
}
},
"1.2-22.04": {
"end-of-life": "2025-05-01T00:00:00Z",
"beta": {
"target": "285"
"target": "318"
},
"edge": {
"target": "285"
"target": "1.2-22.04_beta"
}
}
}
7 changes: 7 additions & 0 deletions src/docs/generate_oci_doc_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import subprocess
import sys
import tempfile
import timezone
from typing import Any, Dict, List
from datetime import datetime
from dateutil import parser

import boto3
Expand Down Expand Up @@ -269,6 +271,11 @@ def build_releases_data(
"until": eol.strftime("%m/%Y")
}

if eol > datetime.now(timezone.utc):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release_data["deprecated"] = {
"date": eol.strftime("%m/%Y")
}

releases.append(release_data)

return releases
Expand Down