closes #779 added fluo version command
diff --git a/modules/distribution/src/main/assembly/bin.xml b/modules/distribution/src/main/assembly/bin.xml
index e2b8bd1..c745003 100644
--- a/modules/distribution/src/main/assembly/bin.xml
+++ b/modules/distribution/src/main/assembly/bin.xml
@@ -49,6 +49,9 @@
<includes>
<include>*/**</include>
</includes>
+ <excludes>
+ <exclude>src/main/scripts/impl/fluo-version.sh</exclude>
+ </excludes>
</fileSet>
<fileSet>
<directory>src/main/config</directory>
@@ -91,5 +94,10 @@
<outputDirectory>conf/examples</outputDirectory>
<filtered>true</filtered>
</file>
+ <file>
+ <source>src/main/scripts/impl/fluo-version.sh</source>
+ <outputDirectory>bin/impl</outputDirectory>
+ <filtered>true</filtered>
+ </file>
</files>
</assembly>
diff --git a/modules/distribution/src/main/scripts/fluo b/modules/distribution/src/main/scripts/fluo
index 3f91f75..8b08369 100755
--- a/modules/distribution/src/main/scripts/fluo
+++ b/modules/distribution/src/main/scripts/fluo
@@ -61,6 +61,7 @@
echo " scan <app> Prints snapshot of data in Fluo application"
echo " classpath Prints the classpath setup in fluo-env.sh"
echo " wait <app> Waits until all notifications are processed"
+ echo " version Prints the version of Fluo"
echo " exec <app> <class> {<argument>}";
echo " "
exit 1
@@ -147,6 +148,9 @@
export CLASSPATH="$APP_LIB_DIR/*:$CLASSPATH"
java org.apache.fluo.cluster.command.FluoCommand $FLUO_HOME $HADOOP_PREFIX "$@"
;;
+version)
+ echo "$FLUO_VERSION"
+ ;;
*)
print_usage
esac
diff --git a/modules/distribution/src/main/scripts/impl/config.sh b/modules/distribution/src/main/scripts/impl/config.sh
index 7abbbe5..4b46085 100755
--- a/modules/distribution/src/main/scripts/impl/config.sh
+++ b/modules/distribution/src/main/scripts/impl/config.sh
@@ -64,3 +64,4 @@
export SED="sed -i"
fi
+. $impl/fluo-version.sh
diff --git a/modules/distribution/src/main/scripts/impl/fluo-version.sh b/modules/distribution/src/main/scripts/impl/fluo-version.sh
new file mode 100644
index 0000000..30dd115
--- /dev/null
+++ b/modules/distribution/src/main/scripts/impl/fluo-version.sh
@@ -0,0 +1,17 @@
+#! /usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+# agreements. See the NOTICE file distributed with this work for additional information regarding
+# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License. You may obtain a
+# copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+
+# Maven should set correct Fluo version below at build time
+FLUO_VERSION=${project.version}