@@ -239,7 +239,7 @@ func (s *ArtifactsService) ProcessGitHubTags(tags []GitHubTag) ArtifactData {
239239 }
240240 }
241241
242- // Sort by version number (descending)
242+ // Sort by version number (descending) - highest version first
243243 sort .Slice (artifactTags , func (i , j int ) bool {
244244 versionA := s .extractVersionNumber (artifactTags [i ].Name )
245245 versionB := s .extractVersionNumber (artifactTags [j ].Name )
@@ -248,15 +248,28 @@ func (s *ArtifactsService) ProcessGitHubTags(tags []GitHubTag) ArtifactData {
248248
249249 now := time .Now ().UTC ().Format (time .RFC3339 )
250250
251- for _ , tag := range artifactTags {
251+ for idx , tag := range artifactTags {
252252 versionNumber := s .extractVersionNumber (tag .Name )
253253 version := strconv .Itoa (versionNumber )
254254
255+ // Determine support status based on position in sorted list
256+ // Position 0 = Latest (newest single version)
257+ // Position 1-3 = Recommended (stable versions)
258+ // Rest based on version thresholds
259+ var status SupportStatus
260+ if idx == 0 {
261+ status = Latest
262+ } else if idx <= 3 {
263+ status = Recommended
264+ } else {
265+ status = s .determineSupportStatus (versionNumber )
266+ }
267+
255268 baseEntry := Artifact {
256269 Version : version ,
257270 Hash : tag .Commit .SHA ,
258271 Date : now ,
259- SupportStatus : s . determineSupportStatus ( versionNumber ) ,
272+ SupportStatus : status ,
260273 }
261274
262275 // Windows artifact
@@ -464,14 +477,16 @@ func (s *ArtifactsService) extractVersionNumber(tagName string) int {
464477}
465478
466479func (s * ArtifactsService ) determineSupportStatus (version int ) SupportStatus {
480+ // Based on CFX EOL policy: https://aka.cfx.re/eol
481+ // This is used for versions beyond the top 4 (Latest + 3 Recommended)
482+ // which are dynamically assigned in ProcessGitHubTags
483+ // Active = still supported but older
484+ // Deprecated = support ending soon
485+ // EOL = no longer supported
467486 switch {
468- case version >= 24500 :
469- return Recommended
470- case version >= 24000 :
471- return Latest
472- case version >= 23000 :
487+ case version >= 23000 : // Still actively supported
473488 return Active
474- case version >= 20000 :
489+ case version >= 20000 : // Support ending
475490 return Deprecated
476491 default :
477492 return EOL
0 commit comments