Accepting request 64868 from home:ammler:branches:openSUSE:Tools
thanks OBS-URL: https://build.opensuse.org/request/show/64868 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=12
This commit is contained in:
parent
d9ba034cba
commit
529653743c
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 22 14:55:55 UTC 2011 - ammler@openttdcoop.org
|
||||
|
||||
- Fix: recompressed tars were never reused
|
||||
- cleanup mercurial commands
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 8 16:00:48 UTC 2011 - adrian@suse.de
|
||||
|
||||
|
@ -3,7 +3,8 @@ Name: obs-service-tar_scm
|
||||
License: GPL v2 or later
|
||||
Group: Development/Tools/Building
|
||||
Summary: An OBS source service: checkout or update a tar ball from svn/git/hg
|
||||
Version: 0.2
|
||||
URL: https://build.opensuse.org/package/show?package=obs-service-tar_scm&project=openSUSE%3ATools
|
||||
Version: 0.2.1
|
||||
Release: 1
|
||||
Source: tar_scm
|
||||
Source1: tar_scm.service
|
||||
|
13
tar_scm
13
tar_scm
@ -97,7 +97,7 @@ if [ -z "$FILE" -a "$MYSCM" == "hg" ]; then
|
||||
FILE="${FILE##*/}"
|
||||
fi
|
||||
|
||||
existing_tar=$(echo _service:tar_scm:${FILE}-*.tar*)
|
||||
existing_tar=$(echo _service:*tar_scm:${FILE}-*.tar*)
|
||||
if [ -e "$existing_tar" ]; then
|
||||
UNCOMPRESS="cat"
|
||||
if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then
|
||||
@ -188,12 +188,12 @@ elif [ "$MYSCM" == "hg" ]; then
|
||||
if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
|
||||
# update existing content for speed/bandwidth reasons
|
||||
cd "$TAR_DIRECTORY"
|
||||
OLDVERSION=`hg tip | head -n 1 | sed -e 's/\s*//g' | awk -F':' '{ print $2 }'`
|
||||
OLDVERSION=`hg id -i -rtip`
|
||||
hg pull || exit 1
|
||||
if [ -n "$MYREVISION" ]; then
|
||||
hg checkout "$MYREVISION" || exit 1
|
||||
hg update "$MYREVISION" || exit 1
|
||||
fi
|
||||
NEWVERSION=`hg tip | head -n 1 | sed -e 's/\s*//g' | awk -F':' '{ print $2 }'`
|
||||
NEWVERSION=`hg id -i -rtip`
|
||||
cd -
|
||||
if [ "$OLDVERSION" == "$NEWVERSION" ]; then
|
||||
# cleanup and skip
|
||||
@ -206,14 +206,15 @@ elif [ "$MYSCM" == "hg" ]; then
|
||||
hg clone "$MYURL" "${FILE}" || exit 1
|
||||
if [ -n "$MYREVISION" ]; then
|
||||
cd "$FILE"
|
||||
hg checkout "$MYREVISION" || exit 1
|
||||
hg update "$MYREVISION" || exit 1
|
||||
cd -
|
||||
fi
|
||||
fi
|
||||
if [ -z "$VERSION" ]; then
|
||||
cd "$FILE"
|
||||
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
|
||||
VERSION="$MYPREFIX"`hg tip | head -n 1 | sed -e 's/\s*//g' | awk -F':' '{ print $2 }'`
|
||||
# current working revision
|
||||
VERSION="$MYPREFIX"`hg id -n`
|
||||
cd -
|
||||
fi
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user