commit 3bdb83a97f78c16f8bc9db8c402dce72191dfdab
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Sun Jul 11 14:26:49 2021 +0100
Fix git date on builds names
mythtv.spec | 10 ++++++----
update_fixes.sh | 10 +++++-----
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/mythtv.spec b/mythtv.spec
index f3e14b1..4c9a962 100644
--- a/mythtv.spec
+++ b/mythtv.spec
@@ -1,6 +1,11 @@
# The full MythTV Version string is computed from the output of git describe.
%global vers_string v31.0-158-g0680b37c68
+# The git date of last commit on mythtv repo
+# git_date=$(git log -1 --format=%cd --date=format:"%Y%m%d")
+%global git_date 20210610
+
+
# Specfile for building MythTV and MythPlugins RPMs from a git checkout.
#
# by: Chris Petersen <cpetersen(a)mythtv.org>
@@ -55,14 +60,11 @@
################################################################################
%define _lto_cflags %{nil}
-# The build date is today
-%global bld_date %(date +"%Y%m%d")
-
# These values are computed from git describe provided earlier
%global githash %(c=%{vers_string}; echo $c|cut -d"-" -f3)
%global shorthash %(c=%{githash}; echo ${c:1:11})
%global commits %(c=%{vers_string}; echo $c|cut -d"-" -f2)
-%global rel_string .%{commits}.%{bld_date}git%{shorthash}
+%global rel_string .%{commits}.%{git_date}git%{shorthash}
# A list of which applications we want to put into the desktop menu system
%global desktop_applications mythfrontend mythtv-setup
diff --git a/update_fixes.sh b/update_fixes.sh
index 1126609..98f9470 100755
--- a/update_fixes.sh
+++ b/update_fixes.sh
@@ -1,5 +1,5 @@
-RAWHIDE=34
-REPOS="f33 f32"
+RAWHIDE=35
+REPOS="f34 f33 el8 el7"
if ! [ -d "mythtv" ]; then
git clone
git://github.com/MythTV/mythtv.git
@@ -11,17 +11,17 @@ git checkout $branch
git pull
git log v$version..HEAD > ../mythtv-ChangeLog
newdescrib=$(git describe)
-date=$(git log -1 --format=%cd --date=short | tr -d \-)
+date=$(git log -1 --format=%cd --date=format:"%Y%m%d")
relversion=$(echo $newdescrib | sed "s/^[^-]*//; s/-/./g; s/\.g/.${date}git/")
githash=$(git rev-parse HEAD)
shorthash=$(echo $githash | cut -b -10)
popd
+echo $date
# Clean previous modifications on mythtv.spec
#echo Press enter to run: Clean previous modifications on mythtv.spec; read dummy;
#git checkout mythtv.spec
sed -i "s|global vers_string .*|global vers_string $newdescrib|" mythtv.spec
-sed -i "s|global rel_string .*|global rel_string $relversion|" mythtv.spec
-sed -i "s|global githash .*|global githash $githash|" mythtv.spec
+sed -i "s|global git_date .*|global git_date $date|" mythtv.spec
rpmdev-bumpspec -c "Update to $version$relversion from branch $branch "
mythtv.spec
spectool -g mythtv.spec
rfpkg scratch-build --srpm