public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedora-appstream-metadata] rawhide: update-appstream-metadata: Set version as stable if release date < 1 week
Date: Fri, 13 Nov 2026 11:51:19 GMT	[thread overview]
Message-ID: <179457067901.1.7427907695008194426.rpms-fedora-appstream-metadata-775a43102338@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/fedora-appstream-metadata
            Branch : rawhide
            Commit : 775a431023386779e23e068fdf5da5594de4f4ee
            Author : Timothée Ravier <tim@siosm.fr>
            Date   : 2026-11-11T21:46:44+01:00
            Stats  : +14/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-appstream-metadata/c/775a431023386779e23e068fdf5da5594de4f4ee?branch=rawhide

            Log:
            update-appstream-metadata: Set version as stable if release date < 1 week

If we are updating the metadata and the release is in less than a week
then this likely means that Fedora N+1 is GO, thus set it as stable.

See: https://src.fedoraproject.org/rpms/fedora-appstream-metadata/pull-request/19
See: https://src.fedoraproject.org/rpms/fedora-appstream-metadata/pull-request/20

---
diff --git a/update-appstream-metadata.go b/update-appstream-metadata.go
index 8212733..0a311f1 100644
--- a/update-appstream-metadata.go
+++ b/update-appstream-metadata.go
@@ -313,11 +313,23 @@ func main() {
 
 		switch c.Status {
 		case "Under Development":
-			r.Type = "development"
 			betaurl := fmt.Sprintf("https://fedoramagazine.org/announcing-fedora-%s-beta/", c.Version)
 			if isValidURL(betaurl) {
-				r.Description.P = betaurl
+				releaseDate, err := time.Parse(time.DateOnly, r.Date)
+				if err != nil {
+					log.Fatal("Could not parse release date as a valid date")
+				}
+				if releaseDate.Sub(time.Now().AddDate(0, 0, 7)) < 0 {
+					log.Printf("Release date for %s %s is in less than a week. Setting as stable.", c.Name, c.Version)
+					r.Type = "stable"
+					r.Description.P = fmt.Sprintf("https://fedoramagazine.org/announcing-fedora-linux-%s/", c.Version)
+				} else {
+					log.Printf("Release date for %s %s is more than a week. Keeping as beta.", c.Name, c.Version)
+					r.Type = "development"
+					r.Description.P = betaurl
+				}
 			} else {
+				r.Type = "development"
 				r.Description.P = "The upcoming release of Fedora Linux."
 			}
 		case "Active", "EOL":

                 reply	other threads:[~2026-11-13 11:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179457067901.1.7427907695008194426.rpms-fedora-appstream-metadata-775a43102338@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox