Mailinglist Archive: opensuse-buildservice (175 mails)

< Previous Next >
[opensuse-buildservice] [PATCH] [obs-service-tar_scm] Enable tar_scm for git 1.6.x
git 1.6.x and very likely other version only support "show --pretty=format:%at"
as parameter with "format:" prefix. git show --pretty=%at is also support by
recent git versions.

---
tar_scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Index: obs-service-tar_scm/tar_scm
===================================================================
--- obs-service-tar_scm.orig/tar_scm
+++ obs-service-tar_scm/tar_scm
@@ -178,12 +178,12 @@ elif [ "$MYSCM" == "git" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.git" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
- OLDVERSION=`git show --pretty=%at | head -n 1`
+ OLDVERSION=`git show --pretty=format:%at | head -n 1`
git pull $MYGITARGS || exit 1
if [ -n "$MYREVISION" ]; then
git checkout "$MYREVISION" || exit 1
fi
- NEWVERSION=`git show --pretty=%at | head -n 1`
+ NEWVERSION=`git show --pretty=format:%at | head -n 1`
cd -
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
else
@@ -198,7 +198,7 @@ elif [ "$MYSCM" == "git" ]; then
if [ "$VERSION" == "_auto_" ]; then
cd "$FILE"
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
- VERSION="$MYPREFIX"`git show --pretty=%at | head -n 1`
+ VERSION="$MYPREFIX"`git show --pretty=format:%at | head -n 1`
cd -
fi
elif [ "$MYSCM" == "hg" ]; then

--
Daniel Gollub
Linux Consultant & Developer
Tel.: +49-160 47 73 970
Mail: gollub@xxxxxxxxxxxxx

B1 Systems GmbH
Osterfeldstra├če 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
< Previous Next >
This Thread
  • No further messages