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>
|
||||
<!-- Generate web app sources -->
|
||||
<execution>
|
||||
<id>generate</id>
|
||||
<id>generate-Version-information</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<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"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
|
|
@ -37,20 +37,18 @@ fi
|
|||
date=`date`
|
||||
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'`
|
||||
revision=`(svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p') || true`
|
||||
url=`(svn info | sed -n -e 's/^URL: \(.*\)/\1/p') || true`
|
||||
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`
|
||||
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"
|
||||
url="file://$cwd"
|
||||
fi
|
||||
if [ -z $revision ]; then
|
||||
echo "$revision is empty!"
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -x "$(command -v md5sum)" ]; then
|
||||
if ! [ -x "$(command -v md5)" ]; then
|
||||
srcChecksum="Unknown"
|
||||
|
|
Loading…
Reference in New Issue