link old tar ball into result directory when no new commit appeared

OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=22
This commit is contained in:
Adrian Schröter 2011-08-26 06:45:56 +00:00 committed by Git OBS Bridge
parent 2fbc97d24c
commit b7cffa8bf1
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Aug 26 06:45:17 UTC 2011 - adrian@suse.de
- link old tar ball into result directory when no new commit appeared
-------------------------------------------------------------------
Thu Aug 25 16:17:02 UTC 2011 - markus.lehtonen@linux.intel.com

View File

@ -127,7 +127,11 @@ if [ -e "$existing_tar" ]; then
fi
if $UNCOMPRESS "$existing_tar" | tar xf -; then
TAR_DIRECTORY=`find * -maxdepth 0 -a -type d`
else
existing_tar=""
fi
else
existing_tar=""
fi
if [ "$MYSCM" == "svn" ]; then
@ -145,6 +149,7 @@ if [ "$MYSCM" == "svn" ]; then
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
# cleanup and skip
rm -rf "$TAR_DIRECTORY"
cp -l "$existing_tar" "${existing_tar##*:}"
exit 0
fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
@ -184,6 +189,7 @@ elif [ "$MYSCM" == "git" ]; then
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
# cleanup and skip
rm -rf "$TAR_DIRECTORY"
cp -l "$existing_tar" "${existing_tar##*:}"
exit 0
fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
@ -213,6 +219,7 @@ elif [ "$MYSCM" == "hg" ]; then
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
# cleanup and skip
rm -rf "$TAR_DIRECTORY"
cp -l "$existing_tar" "${existing_tar##*:}"
exit 0
fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
@ -246,6 +253,7 @@ elif [ "$MYSCM" == "bzr" ]; then
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
# cleanup and skip
rm -rf "$TAR_DIRECTORY"
cp -l "$existing_tar" "${existing_tar##*:}"
exit 0
fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1