public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Stephen Gallagher <sgallagh@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/fedora-release] f45: Add "Prerelease" notation to PRETTY_NAME and VERSION in os-release
Date: Mon, 10 Aug 2026 09:35:08 GMT [thread overview]
Message-ID: <178635450887.1.7048859857957250468.rpms-fedora-release-a0105c73825b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/fedora-release
Branch : f45
Commit : a0105c73825b6798e09c63c8434cd1d3b91257d0
Author : Stephen Gallagher <sgallagh@redhat.com>
Date : 2020-04-27T20:54:14+00:00
Stats : +16/-3 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/fedora-release/c/a0105c73825b6798e09c63c8434cd1d3b91257d0?branch=f45
Log:
Add "Prerelease" notation to PRETTY_NAME and VERSION in os-release
If the release field of fedora-release starts with 0, it is a
pre-release. Including this in PRETTY_NAME and VERSION will make it
easier to identify in other applications whether this is a stable
or in-development release.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
diff --git a/fedora-release.spec b/fedora-release.spec
index 3d38f4d..3cd3a2e 100644
--- a/fedora-release.spec
+++ b/fedora-release.spec
@@ -14,7 +14,7 @@
Summary: Fedora release files
Name: fedora-release
Version: 33
-Release: 0.5
+Release: 0.6
License: MIT
URL: https://fedoraproject.org/
@@ -324,14 +324,24 @@ ln -s fedora-release %{buildroot}%{_sysconfdir}/redhat-release
ln -s fedora-release %{buildroot}%{_sysconfdir}/system-release
# Create the common os-release file
+%{lua:
+ function starts_with(str, start)
+ return str:sub(1, #start) == start
+ end
+}
+%define starts_with(str,prefix) (%{expand:%%{lua:print(starts_with(%1, %2) and "1" or "0")}})
+%if %{starts_with "a%{release}" "a0"}
+ %global prerelease \ Prerelease
+%endif
+
cat << EOF >>%{buildroot}%{_prefix}/lib/os-release
NAME=Fedora
-VERSION="%{dist_version} (%{release_name})"
+VERSION="%{dist_version} (%{release_name}%{?prerelease})"
ID=fedora
VERSION_ID=%{dist_version}
VERSION_CODENAME=""
PLATFORM_ID="platform:f%{dist_version}"
-PRETTY_NAME="Fedora %{dist_version} (%{release_name})"
+PRETTY_NAME="Fedora %{dist_version} (%{release_name}%{?prerelease})"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:%{dist_version}"
@@ -636,6 +646,9 @@ ln -s %{_swidtagdir} %{buildroot}%{_sysconfdir}/swid/swidtags.d/fedoraproject.or
%changelog
+* Mon Apr 20 2020 Stephen Gallagher <sgallagh@redhat.com> - 33-0.6
+- Add "Prerelease" notation to PRETTY_NAME and VERSION in os-release
+
* Sun Apr 12 2020 Kevin Fenzi <kevin@scrye.com> - 33-0.5
- Update color to Fedora blue. Fixes bug #1823099
reply other threads:[~2026-08-10 9:35 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=178635450887.1.7048859857957250468.rpms-fedora-release-a0105c73825b@fedoraproject.org \
--to=sgallagh@redhat.com \
--cc=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