HCATALOG-605 HCatalog release script does not update version in build.properties

git-svn-id: https://svn.apache.org/repos/asf/incubator/hcatalog/branches/branch-0.5@1437737 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 9a9148a..c875ffe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -164,6 +164,8 @@
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-605 HCatalog release script does not update version in build.properties (traviscrawford)
+
   HCAT-603 releaseaudit should run before generating artifacts (traviscrawford)
 
   HCAT-598 fix setting hcatalog version number via the command-line (traviscrawford)
diff --git a/build-support/scripts/release.sh b/build-support/scripts/release.sh
index 731388f..dd31ea8 100755
--- a/build-support/scripts/release.sh
+++ b/build-support/scripts/release.sh
@@ -29,9 +29,13 @@
   exit -1
 fi
 
-find . -name pom.xml -exec sed -i '' "s/0.5.0-SNAPSHOT/${HCAT_RELEASE_VERSION}/" {} \;
+snapshot_version=$(awk -F= '/hcatalog.version=/ { print $2 }' build.properties)
 
-export ANT_ARGS="${ANT_ARGS} -Dhcatalog.version=${HCAT_RELEASE_VERSION}"
+find . -name pom.xml -exec sed -i '' "s/${snapshot_version}/${HCAT_RELEASE_VERSION}/" {} \;
+sed -i '' "s/${snapshot_version}/${HCAT_RELEASE_VERSION}/" build.properties
+
+# useful to pass in "-Dtestcase=Foo" to bypass tests when troubleshooting builds
+export ANT_ARGS="${ANT_ARGS}"
 
 ./build-support/scripts/test.sh
 
diff --git a/build.properties b/build.properties
index e2c840d..e77a8bc 100644
--- a/build.properties
+++ b/build.properties
@@ -15,9 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-_version=0.5.0
-_vtype=-SNAPSHOT
-hcatalog.version=${_version}${_vtype}
+hcatalog.version=0.5.0-SNAPSHOT
 jar.name=${ant.project.name}-${hcatalog.version}.jar
 hcatalog.jar=${ant.project.name}-${hcatalog.version}.jar
 hcatalog.core.jar=${ant.project.name}-core-${hcatalog.version}.jar