HBASE-21999 ADDENDUM unknown revisions are okay; make sure we indicate them.
(cherry picked from commit a7bbff170a
)
This commit is contained in:
parent
235272056d
commit
fc3d45954b
|
@ -86,13 +86,13 @@
|
||||||
</execution>
|
</execution>
|
||||||
<!-- Generate web app sources -->
|
<!-- Generate web app sources -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>generate</id>
|
<id>generate-Version-information</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<target>
|
<target>
|
||||||
<property name="generated.sources" location="${project.build.directory}/generated-sources"/>
|
<property name="generated.sources" location="${project.build.directory}/generated-sources"/>
|
||||||
|
|
||||||
<exec executable="bash">
|
<exec executable="bash" failonerror="true">
|
||||||
<arg line="${basedir}/src/saveVersion.sh ${project.version} ${generated.sources}/java"/>
|
<arg line="${basedir}/src/saveVersion.sh ${project.version} ${generated.sources}/java"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -37,20 +37,18 @@ fi
|
||||||
date=`date`
|
date=`date`
|
||||||
cwd=`pwd`
|
cwd=`pwd`
|
||||||
if [ -d .svn ]; then
|
if [ -d .svn ]; then
|
||||||
revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
|
revision=`(svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p') || true`
|
||||||
url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
|
url=`(svn info | sed -n -e 's/^URL: \(.*\)/\1/p') || true`
|
||||||
elif [ -d .git ]; then
|
elif [ -d .git ]; then
|
||||||
revision=`git log -1 --no-show-signature --pretty=format:"%H"`
|
revision=`git log -1 --no-show-signature --pretty=format:"%H" || true`
|
||||||
hostname=`hostname`
|
hostname=`hostname`
|
||||||
url="git://${hostname}${cwd}"
|
url="git://${hostname}${cwd}"
|
||||||
else
|
fi
|
||||||
|
if [ -z "${revision}" ]; then
|
||||||
|
echo "[WARN] revision info is empty! either we're not in VCS or VCS commands failed." >&2
|
||||||
revision="Unknown"
|
revision="Unknown"
|
||||||
url="file://$cwd"
|
url="file://$cwd"
|
||||||
fi
|
fi
|
||||||
if [ -z $revision ]; then
|
|
||||||
echo "$revision is empty!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if ! [ -x "$(command -v md5sum)" ]; then
|
if ! [ -x "$(command -v md5sum)" ]; then
|
||||||
if ! [ -x "$(command -v md5)" ]; then
|
if ! [ -x "$(command -v md5)" ]; then
|
||||||
srcChecksum="Unknown"
|
srcChecksum="Unknown"
|
||||||
|
|
Loading…
Reference in New Issue