4 # This script deletes a component tag
8 # $2 : tag type (doc, package, source, test)
13 # Environment variable that MUST be defined
14 # by the calling script
16 # SVN_URL SVN_USER SVN_PASS
21 . `dirname $0`/functions
27 BIN_SVN="/usr/bin/svn"
45 if [ $EXIT -eq 0 ] ; then
48 $BIN_ECHO "-> SVN component parameter is missing"
54 $BIN_ECHO "-> Tag type parameter is missing (doc, package, source or test)"
57 if [ "$2" != "doc" -a "$2" != "package" -a "$2" != "source" -a "$2" != "test" ] ; then
58 $BIN_ECHO "-> Tag type '$2' is not supported (doc, package, source or test)"
65 $BIN_ECHO "-> SVN version parameter is missing"
71 if [ "$TAG_TYPE" = "package" ] ; then
72 $BIN_ECHO "-> SVN release parameter is missing"
79 if [ $EXIT -eq 0 ] ; then
81 if [ "$TAG_TYPE" = "package" ] ; then
82 TAG_NAME="$TAG_NAME-$SVN_RELEASE"
84 $BIN_SVN delete --username $SVN_USER --password $SVN_PASS -m "Delete tag $TAG_TYPE/$TAG_NAME of component $SVN_COMPONENT" $SVN_URL/tags/component/$SVN_COMPONENT/$TAG_TYPE/$TAG_NAME >> /dev/null 2>&1
85 if [ $? -ne 0 ] ; then
86 $BIN_ECHO "-> Error while deleting tag '$SVN_URL/tags/component/$SVN_COMPONENT/$TAG_TYPE/$TAG_NAME'"