Skip to content

Commit

Permalink
develmaster: Commits for v2.3.0 (#320)
Browse files Browse the repository at this point in the history
* [harbour-storeman-installer.spec] Post release version increase (#317)

* [harbour-storeman-installer.spec] Fix and beautify (#319)

* [harbour-storeman-installer.spec] Fix missing `$` for variable evaluation (3ffb000)

* [harbour-storeman-installer.spec] Beautify, comment and enhance `%post` scriptlet (5367806)
  • Loading branch information
Olf0 authored Nov 24, 2024
2 parents c237273 + ca6ad43 commit c6024b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions rpm/harbour-storeman-installer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Name: harbour-storeman-installer
# The Git tag format must adhere to <release>/<version> since 2023-05-18.
# The <version> tag must adhere to semantic versioning, for details see
# https://semver.org/
Version: 2.2.8
Version: 2.2.9
# The <release> tag comprises one of {alpha,beta,rc,release} postfixed with a
# natural number greater or equal to 1 (e.g. "beta3") and may additionally be
# postfixed with a plus character ("+"), the name of the packager and a release
Expand All @@ -15,7 +15,7 @@ Version: 2.2.8
# build at GitHub and OBS, when configured accordingly; mind the sorting
# (`adud` < `alpha`). For details and reasons, see
# https://github.com/Olf0/sfos-upgrade/wiki/Git-tag-format
Release: release9
Release: release10
# The Group tag should comprise one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Software Management/Package Manager
Expand Down Expand Up @@ -175,14 +175,15 @@ source %{_sysconfdir}/os-release
# might be advisable, when using it inside a %%define statement's `%%()` ).
sailfish_version="$(echo "$VERSION_ID" | cut -s -f 1-3 -d '.' | tr -d '.')"
# sailfish_version must be an all numerical string of at least three digits:
if ! echo "sailfish_version" | grep -q '^[0-9][0-9][0-9][0-9]*$'
if [ $(echo "$sailfish_version" | grep -c '^[0-9][0-9][0-9][0-9]*$') != 1 ]
then echo "Error: VERSION_ID=$VERSION_ID => sailfish_version=$sailfish_version" >&2
else
# Ensure that the repo config is correct: If it is missing or a fixed
# SFOS-release number was used, set it anew.
release_macro="$(grep '^harbour-storeman-obs=' %{_sysconfdir}/ssu/ssu.ini | grep -o '/[[:graph:]][[:graph:]][[:graph:]][[:graph:]]*/$' | grep -o '%%(release[[:alpha:]]*)')"
if [ $sailfish_version -ge 460 ] && [ "$release_macro" != '%%(releaseMajorMinor)' ]
then
# No `ssu rr harbour-storeman-obs` needed, because an `ssu ar <name> <URL>` overwrites an extant entry.
ssu ar harbour-storeman-obs 'https://repo.sailfishos.org/obs/home:/olf:/harbour-storeman/%%(releaseMajorMinor)_%%(arch)/'
ssu_ur=yes
elif [ $sailfish_version -lt 460 ] && [ "$release_macro" != '%%(release)' ]
Expand All @@ -191,9 +192,7 @@ else
ssu_ur=yes
fi
fi
if [ $ssu_ur = yes ]
then ssu ur
fi
[ $ssu_ur = yes ] && ssu ur
# BTW, `ssu`, `rm -f`, `mkdir -p` etc. *always* return with "0" ("success"), hence
# no appended `|| true` needed to satisfy `set -e` for failing commands outside of
# flow control directives (if, while, until etc.). Furthermore Fedora Docs etc.
Expand Down

0 comments on commit c6024b5

Please sign in to comment.