~aperezdc/webkit-releng-toolbelt

93b71c65e404885367b714bb56a4eaf384e41ac0 — Adrian Perez de Castro 5 years ago 813b899
Support a new %{stability} template variable

Add a new %{stability} template variable, which expands to either
"stable" or "unstable" depending on whether the minor version number
for a package is even or odd. This reflects the GLib convention for
minor version numbers, which also applies to WebKit GTK and WPE ports
and their related components.
3 files changed, 3 insertions(+), 1 deletions(-)

M README.md
M conf/defaults.yml
M wkrel/release.py
M README.md => README.md +1 -0
@@ 211,6 211,7 @@ The following variables are available for expansion in
| `%{packageid}` | Same as `%{package}`, in lowercase with whitespace characters removed. |
| `%{release-notes}` | Release notes extracted from the file specified by the `changelog` configuration item. |
| `%{release-tagline}` | String indicating the maturity of the release, e.g.  `This is a stable release in the 1.4 series.`. |
| `%{stability}` | Expands to `stable` if the minor version number is even, otherwise to `unstable`. |
| `%{version}` | Package version string i.e. the part matched by `%` from the `pattern`. |
| `%{tar.*}` | Information about the package tarball file. |


M conf/defaults.yml => conf/defaults.yml +1 -1
@@ 72,7 72,7 @@ files:
    ---
    layout: post
    title: %{package} %{version} released
    tags: [release]
    tags: [release, %{stability}]
    package: %{packageid}
    version: %{version}
    permalink: /release/%{packageid}-%{version}.html

M wkrel/release.py => wkrel/release.py +1 -0
@@ 94,6 94,7 @@ class Release(object):
            "date": date_string,
            "release-notes": lambda: self.notes,
            "release-tagline": lambda: self.tagline,
            "stability": lambda: "stable" if self.is_stable else "unstable",
            "version": lambda: self.version_string,
            "tar": self.file,
        }