From 8a00dc898f6c62e095d0a485e6ddc944006ba3a1 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Thu, 9 Jan 2020 18:02:21 +0200 Subject: [PATCH] ci: fedora: force correct rpm package version RPM doesn't allow '-' in the version number, so this must be fixed if also when building from an untagged git tree. sanitize_for_ci() from get-version.py fixes it only when build is CI environment. Signed-off-by: Tomas Winkler --- contrib/ci/fedora.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ci/fedora.sh b/contrib/ci/fedora.sh index de86fd450..222aeb201 100755 --- a/contrib/ci/fedora.sh +++ b/contrib/ci/fedora.sh @@ -21,11 +21,12 @@ meson .. \ ninja-build dist popd VERSION=`./contrib/get-version.py` +RPMVERSION=${VERSION//-/.} mkdir -p $HOME/rpmbuild/SOURCES/ mv build/meson-dist/fwupd-$VERSION.tar.xz $HOME/rpmbuild/SOURCES/ #generate a spec file -sed "s,#VERSION#,$VERSION,; +sed "s,#VERSION#,$RPMVERSION,; s,#TARBALL_VERSION#,$VERSION,; s,#BUILD#,1,; s,#LONGDATE#,`date '+%a %b %d %Y'`,;