Skip to content

Commit

Permalink
try to use tag/branch name for version if version.inc.php not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmondas Girkantas committed Jun 29, 2011
1 parent 87c626c commit 480387d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ then
echo "Usage: ./create_release [trunk|tags x.x.x|branches name]"
fi

# check if svn executable exists on the system
if [ $# -ne 0 ]
then
result=`svn --version 2>/dev/null`
Expand Down Expand Up @@ -90,7 +91,16 @@ fi
# get release version if current directory is used
if [ "$VERSION" = "" ]
then
VERSION=`cat $WORK_DIR/inc/version.inc.php | grep VERSION | cut -d '"' -f2`
if [ -e $WORK_DIR"/inc/version.inc.php" ]
then
VERSION=`cat $WORK_DIR/inc/version.inc.php | grep VERSION | \
cut -d '"' -f2`
else
if [ $# -eq 2 ]
then
VERSION=$SVN_PROJ_OR_TAG
fi
fi

if [ "$VERSION" = "" ]
then
Expand All @@ -109,7 +119,7 @@ then
exit
fi

# build exclude pattersn
# build exclude patterns
for pattern in $EXCLUDE_FILES_DIRS; do
OTHER_EXCLUDES=$OTHER_EXCLUDES" --exclude="$pattern
done
Expand Down

0 comments on commit 480387d

Please sign in to comment.