HBASE-2590 Failed parse of branch element in saveVersion.sh

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@947082 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-05-21 17:31:37 +00:00
parent b2d7b19bc3
commit 2d6804b03e
2 changed files with 1 additions and 7 deletions

View File

@ -348,6 +348,7 @@ Release 0.21.0 - Unreleased
HBASE-2582 TestTableSchemaModel not passing after commit of blooms
HBASE-2583 Make webapps work in distributed mode again and make webapps
deploy at / instead of at /webapps/master/master.jsp
HBASE-2590 Failed parse of branch element in saveVersion.sh
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -31,25 +31,18 @@ cwd=`pwd`
if [ -d .svn ]; then
revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
url=`svn info | sed -n -e 's/URL: \(.*\)/\1/p'`
# Get canonical branch (branches/X, tags/X, or trunk)
branch=`echo $url | sed -n -e 's,.*\(branches/.*\)$,\1,p' \
-e 's,.*\(tags/.*\)$,\1,p' \
-e 's,.*trunk$,trunk,p'`
elif [ -d ../.git ]; then
revision=`git log -1 --pretty=format:"%H"`
hostname=`hostname`
branch=`git branch | sed -n -e 's/^* //p'`
url="git://${hostname}${cwd}"
else
revision="Unknown"
branch="Unknown"
url="file://$cwd"
fi
mkdir -p $outputDirectory/org/apache/hadoop/hbase
cat << EOF | \
sed -e "s/VERSION/$version/" -e "s/USER/$user/" -e "s/DATE/$date/" \
-e "s|URL|$url|" -e "s/REV/$revision/" \
-e "s|BRANCH|$branch|" \
> $outputDirectory/org/apache/hadoop/hbase/package-info.java
/*
* Generated by src/saveVersion.sh