Skip to content

Commit

Permalink
add 'deprecated' field for depreacted section generation in image docs
Browse files Browse the repository at this point in the history
  • Loading branch information
linostar committed Jun 21, 2024
1 parent ecb8731 commit e1cc71f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion oci/mock-rock/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ upload:
directory: examples/mock-rock/1.0
release:
1.0-22.04:
end-of-life: "2025-05-01T00:00:00Z"
end-of-life: "2024-05-01T00:00:00Z"
risks:
- candidate
- edge
Expand Down
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):
release_data["deprecated"] = {
"date": eol.strftime("%m/%Y")
}

releases.append(release_data)

return releases
Expand Down

0 comments on commit e1cc71f

Please sign in to comment.