Adrian Schröter 2011-08-17 07:56:56 +00:00 committed by Git OBS Bridge
parent 0e69e56522
commit 0fed603d32
3 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Aug 17 07:54:29 UTC 2011 - adrian@suse.de
- make packaging of meta data optional to reduce tar ball size
-------------------------------------------------------------------
Fri Aug 12 11:51:07 UTC 2011 - adrian@suse.de

16
tar_scm
View File

@ -17,6 +17,7 @@ MYVERSION=""
MYPREFIX=""
MYFILENAME=""
MYREVISION=""
MYPACKAGEMETA="false"
while test $# -gt 0; do
case $1 in
@ -52,6 +53,10 @@ while test $# -gt 0; do
MYFILENAME="${2#/}"
shift
;;
*-package-meta)
MYPACKAGEMETA="${2#/}"
shift
;;
*-outdir)
MYOUTDIR="$2"
shift
@ -67,6 +72,9 @@ done
FILE="$MYFILENAME"
VERSION="$MYVERSION"
if [ "$MYPACKAGEMETA" = "false" ]; then
EXCLUDES="$EXCLUDES --exclude-vcs"
fi
if [ -z "$MYSCM" ]; then
echo "ERROR: no scm is given via --scm parameter (git/svn/hg)!"
@ -114,7 +122,7 @@ if [ -e "$existing_tar" ]; then
fi
if [ "$MYSCM" == "svn" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.svn" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`LC_ALL=C svn info | sed -n 's,^Last Changed Rev: \(.*\),\1,p'`
@ -154,7 +162,7 @@ if [ "$MYSCM" == "svn" ]; then
cd -
fi
elif [ "$MYSCM" == "git" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; 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`
@ -186,7 +194,7 @@ elif [ "$MYSCM" == "git" ]; then
cd -
fi
elif [ "$MYSCM" == "hg" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.hg" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`hg id -i -rtip`
@ -216,7 +224,7 @@ elif [ "$MYSCM" == "hg" ]; then
cd -
fi
elif [ "$MYSCM" == "bzr" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.bzr" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`bzr revno`

View File

@ -31,5 +31,10 @@
<parameter name="version">
<description>version to be used in tar</description>
</parameter>
<parameter name="package-meta">
<description>Package the meta data of SCM to allow the user or OBS to update after un-tar</description>
<allowedvalue>true</allowedvalue>
<allowedvalue>false</allowedvalue>
</parameter>
</service>