misc: Make mkosi building suitable for different distro versions

We'd like to be able to build both Fedora N and N-1 at the same time if
possible. This makes it more generally applicable for this scenario, as
well as for other distros.
This commit is contained in:
James Shubin
2019-09-20 14:45:21 -04:00
parent a4db9fc8e5
commit 36d2a0de1e
6 changed files with 140 additions and 73 deletions

View File

@@ -2,9 +2,19 @@
# This script generates an rpm changelog from the project's git history.
# version we're releasing
VERSION="$1"
DISTRO="$1"
VERSION="$2"
if [ "$VERSION" = "" ]; then
echo "usage: ./$0 <distro> <version>"
exit 1
fi
# path to store the changelog
CHANGELOG="releases/${VERSION}/rpm/changelog"
CHANGELOG="releases/${VERSION}/${DISTRO}/changelog"
dir="$(dirname "$CHANGELOG")/"
if [ ! -d "$dir" ]; then
echo "changelog dir ($dir) does not exist"
exit 1
fi
# input to format flag for git tag
TAG_FORMAT="* %(creatordate:format:%a %b %d %Y) %(creator) %(refname:lstrip=2)"
# a list of tags to be parsed in the loop