mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Use the correct branch integrated property when generating the version string.
Copied the make_version file from Asterisk trunk. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,83 +1,79 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -f ${1}/.version ]; then
|
if [ -f ${1}/.version ]; then
|
||||||
cat ${1}/.version
|
cat ${1}/.version
|
||||||
elif [ -d .svn ]; then
|
elif [ -d .svn ]; then
|
||||||
PARTS=`LANG=C svn info ${1} | ${GREP} URL | ${AWK} '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
|
PARTS=`LANG=C svn info ${1} | ${GREP} URL | ${AWK} '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
|
||||||
BRANCH=0
|
BRANCH=0
|
||||||
TEAM=0
|
TEAM=0
|
||||||
TAG=0
|
TAG=0
|
||||||
|
|
||||||
REV=`svnversion -c ${1} | cut -d: -f2`
|
REV=`svnversion -c ${1} | cut -d: -f2`
|
||||||
|
|
||||||
BASE=`LANG=C svn pg svnmerge-integrated ${1} | cut -d: -f1`
|
INTEGRATED=`LANG=C svn pg automerge-propname ${1}`
|
||||||
|
if [ -z "${INTEGRATED}" ] ; then
|
||||||
if [ "${PARTS}" = "trunk" ]
|
INTEGRATED=svnmerge-integrated
|
||||||
then
|
|
||||||
echo SVN-trunk-r${REV}
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for PART in $PARTS
|
BASE=`LANG=C svn pg ${INTEGRATED} ${1} | cut -d: -f1`
|
||||||
do
|
|
||||||
if [ ${TAG} != 0 ]
|
if [ "${PARTS}" = "trunk" ] ; then
|
||||||
then
|
echo SVN-trunk-r${REV}
|
||||||
if [ "${PART}" = "autotag_for_be" ] ; then
|
exit 0
|
||||||
continue
|
fi
|
||||||
fi
|
|
||||||
if [ "${PART}" = "autotag_for_sx00i" ] ; then
|
for PART in $PARTS ; do
|
||||||
continue
|
if [ ${TAG} != 0 ] ; then
|
||||||
fi
|
if [ "${PART}" = "autotag_for_be" ] ; then
|
||||||
RESULT="${PART}"
|
continue
|
||||||
break
|
fi
|
||||||
fi
|
if [ "${PART}" = "autotag_for_sx00i" ] ; then
|
||||||
|
continue
|
||||||
if [ ${BRANCH} != 0 ]
|
fi
|
||||||
then
|
RESULT="${PART}"
|
||||||
if [ -z ${RESULT} ]
|
break
|
||||||
then
|
fi
|
||||||
RESULT="${PART}"
|
|
||||||
else
|
if [ ${BRANCH} != 0 ] ; then
|
||||||
RESULT="${RESULT}-${PART}"
|
if [ -z "${RESULT}" ] ; then
|
||||||
fi
|
RESULT="${PART}"
|
||||||
break
|
else
|
||||||
fi
|
RESULT="${RESULT}-${PART}"
|
||||||
|
fi
|
||||||
if [ ${TEAM} != 0 ]
|
break
|
||||||
then
|
fi
|
||||||
if [ -z ${RESULT} ]
|
|
||||||
then
|
if [ ${TEAM} != 0 ] ; then
|
||||||
RESULT="${PART}"
|
if [ -z "${RESULT}" ] ; then
|
||||||
else
|
RESULT="${PART}"
|
||||||
RESULT="${RESULT}-${PART}"
|
else
|
||||||
fi
|
RESULT="${RESULT}-${PART}"
|
||||||
continue
|
fi
|
||||||
fi
|
continue
|
||||||
|
fi
|
||||||
if [ "${PART}" = "branches" ]
|
|
||||||
then
|
if [ "${PART}" = "branches" ] ; then
|
||||||
BRANCH=1
|
BRANCH=1
|
||||||
RESULT="branch"
|
RESULT="branch"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${PART}" = "tags" ]
|
if [ "${PART}" = "tags" ] ; then
|
||||||
then
|
TAG=1
|
||||||
TAG=1
|
continue
|
||||||
continue
|
fi
|
||||||
fi
|
|
||||||
|
if [ "${PART}" = "team" ] ; then
|
||||||
if [ "${PART}" = "team" ]
|
TEAM=1
|
||||||
then
|
continue
|
||||||
TEAM=1
|
fi
|
||||||
continue
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ${TAG} != 0 ]
|
if [ ${TAG} != 0 ] ; then
|
||||||
then
|
echo ${RESULT}
|
||||||
echo ${RESULT}
|
else
|
||||||
else
|
echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}
|
||||||
echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "UNKNOWN__and_probably_unsupported"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user