diff --git a/build.xml b/build.xml
index 8d71d8d6..bbe5fad4 100644
--- a/build.xml
+++ b/build.xml
@@ -32,7 +32,8 @@
-
+
+
@@ -252,6 +253,7 @@
dir="${basedir}" failonerror="true">
+
diff --git a/src/scripts/write-version-info.sh b/src/scripts/write-version-info.sh
index e9ebd937..11988944 100755
--- a/src/scripts/write-version-info.sh
+++ b/src/scripts/write-version-info.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Licensed to Cloudera, Inc. under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -21,16 +21,22 @@
# Arguments are:
# path to the root of the build directory
# the version number
+# the git hash of the current checkout. If empty, auto-detect.
#
# e.g., $ write-version-info.sh ./build/ 1.0.0
buildroot=$1
version=$2
+specifiedgithash=$3
outputdir=${buildroot}/src/com.cloudera.sqoop
outputfile=${outputdir}/SqoopVersion.java
-signature=`git log -1 --pretty=format:%H`
+signature=$specifiedgithash
+if [ -z "$signature" ]; then
+ signature=`git log -1 --pretty=format:%H`
+fi
+
host=`hostname`
compiledate=`date`