From 6d0c3ea6838a097cefea14b5116597c9298171fd Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 12 Sep 2007 18:13:58 +0000 Subject: [PATCH] Improved svn tagging while releasing --- pam_usb/utils/roll_release.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pam_usb/utils/roll_release.sh b/pam_usb/utils/roll_release.sh index f60da65..edb6cd0 100755 --- a/pam_usb/utils/roll_release.sh +++ b/pam_usb/utils/roll_release.sh @@ -27,8 +27,9 @@ create_release() BUILD_ENV=`mktemp -d /tmp/build.XXXXXX` SRC_PATH=${BUILD_ENV}/pam_usb-${1} TARBALL=pam_usb-${1}.tar.gz + TAG_PATH=${TRUNK_PATH}/../../tags/${1} - if [ -d "${TRUNK_PATH}/../../tags/${1}" -o -f $TARBALL ] ; then + if [ -d $TAG_PATH -o -f $TARBALL ] ; then rm -rf $BUILD_ENV echo "! Release $1 already exists !" exit @@ -36,20 +37,21 @@ create_release() echo "* Rolling release $1 on $BUILD_ENV..." - svn export $TRUNK_PATH ${SRC_PATH} + svn cp $TRUNK_PATH $TAG_PATH + svn export $TRUNK_PATH $SRC_PATH echo "* Cleaning up..." rm -rf $SRC_PATH/utils echo "* Tagging release \"$1\"" sed -ri "s/(PUSB_VERSION) \"[^\"]*\"/\1 \"${1}\"/" ${SRC_PATH}/src/version.h + cp -f ${SRC_PATH}/src/version.h ${TAG_PATH}/src/version.h echo "* Creating tarball..." cd $BUILD_ENV tar -zcf $TARBALL pam_usb-${1} cd - > /dev/null - cp -a $SRC_PATH ${TRUNK_PATH}/../../tags/${1} cp ${BUILD_ENV}/${TARBALL} . rm -rf $BUILD_ENV