aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-21 14:06:47 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-21 14:06:47 +0000
commit6afa27a770796f6c06a6756db8fe3bde9d7ae377 (patch)
tree56653a4773e051c3402ac6452ea00f7ecdc53514 /build_tools
parent7975bd74076f319cbcbbfcbe4eba8e47ecd117ae (diff)
Merged revisions 55868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r55868 | kpfleming | 2007-02-21 08:03:11 -0600 (Wed, 21 Feb 2007) | 2 lines use new tag version script ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@55869 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/make_version19
1 files changed, 14 insertions, 5 deletions
diff --git a/build_tools/make_version b/build_tools/make_version
index 2a4021c8b..6176de2c0 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -2,12 +2,11 @@
if [ -f ${1}/.version ]; then
cat ${1}/.version
-elif [ -f ${1}/.svnrevision ]; then
- echo SVN-`cat ${1}/.svnbranch`-r`cat ${1}/.svnrevision`
elif [ -d .svn ]; then
PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
BRANCH=0
TEAM=0
+ TAG=0
REV=`svnversion -c ${1} | cut -d: -f2`
@@ -19,6 +18,12 @@ elif [ -d .svn ]; then
for PART in $PARTS
do
+ if [ ${TAG} != 0 ]
+ then
+ RESULT="${PART}"
+ break
+ fi
+
if [ ${BRANCH} != 0 ]
then
RESULT="${RESULT}-${PART}"
@@ -40,8 +45,7 @@ elif [ -d .svn ]; then
if [ "${PART}" = "tags" ]
then
- BRANCH=1
- RESULT="tag"
+ TAG=1
continue
fi
@@ -52,5 +56,10 @@ elif [ -d .svn ]; then
fi
done
- echo SVN-${RESULT##-}-r${REV}
+ if [ ${TAG} != 0 ]
+ then
+ echo ${RESULT}
+ else
+ echo SVN-${RESULT##-}-r${REV}
+ fi
fi