[
https://issues.apache.org/jira/browse/HBASE-21999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack resolved HBASE-21999.
---------------------------
Resolution: Fixed
Fix Version/s: 2.1.4
2.2.0
3.0.0
Pushed below to all branch-2.1+
{code}
diff --git a/hbase-common/src/saveVersion.sh b/hbase-common/src/saveVersion.sh
index 730224f0d6..97fe6b4874 100644
--- a/hbase-common/src/saveVersion.sh
+++ b/hbase-common/src/saveVersion.sh
@@ -18,6 +18,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
+
unset LANG
unset LC_CTYPE
@@ -45,10 +47,12 @@ else
revision="Unknown"
url="file://$cwd"
fi
-which md5sum > /dev/null
-if [ "$?" != "0" ] ; then
- which md5 > /dev/null
- if [ "$?" != "0" ] ; then
+if [ -z $revision ]; then
+ echo "$revision is empty!"
+ exit 1
+fi
+if ! [ -x "$(command -v md5sum)" ]; then
+ if ! [ -x "$(command -v md5)" ]; then
{code}
> [DEBUG] Exit if git returns empty revision!
> -------------------------------------------
>
> Key: HBASE-21999
> URL: https://issues.apache.org/jira/browse/HBASE-21999
> Project: HBase
> Issue Type: Sub-task
> Reporter: stack
> Assignee: stack
> Priority: Major
> Fix For: 3.0.0, 2.2.0, 2.0.5, 2.1.4
>
>
> Let me commit a bit of debug on branch-2.0. Can't figure out how we are
> getting empty git revision string. Have the build fail if empty....
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)