7ca082887a
It has now been years since subversion has been used with this project. We can go ahead and simplify the version script now. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
22 lines
593 B
Bash
Executable File
22 lines
593 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -f ${1}/.version ]; then
|
|
cat ${1}/.version
|
|
elif [ -d ${1}/.git ]; then
|
|
VERSION=`git describe --tags --dirty=M 2> /dev/null | sed -e "s/^v\([0-9]\)/\1/"`
|
|
if [ $? -ne 0 ]; then
|
|
MODIFIED=""
|
|
if [ "`git ls-files -m | wc -l`" != "0" ]; then
|
|
MODIFIED="M"
|
|
fi
|
|
# Some older versions of git do not support all the above
|
|
# options.
|
|
VERSION=GIT-`git rev-parse --short --verify HEAD`${MODIFIED}
|
|
fi
|
|
echo ${VERSION}
|
|
else
|
|
# Use the directory information in the absence of any other version
|
|
# information
|
|
pwd -P
|
|
fi
|