display weavetools version

This commit is contained in:
Matthias Radestock committed 2015-01-02 18:29:52 +00:00
1 parent 1fc37bf8df
commit 2d43b92572
1 file changed
+10
+10
View File
@@ -517,6 +517,16 @@ case "$COMMAND" in
echo weave script $SCRIPT_VERSION
ask_version $CONTAINER_NAME $IMAGE
ask_version $DNS_CONTAINER_NAME $DNS_IMAGE
if ! TOOLS_IMAGE_ID=$(docker inspect --format='{{ .Id }}' $TOOLS_IMAGE 2>/dev/null) ; then
echo "Unable to find $TOOLS_IMAGE image." >&2
else
TOOLS_VERSION=$(docker images --no-trunc | grep $TOOLS_IMAGE_ID | grep -v latest | tr -s ' ' | cut -d ' ' -f 2 | tr "\n" ' ')
if [ -n "$TOOLS_VERSION" ] ; then
echo "weave tools $TOOLS_VERSION"
else
echo "weave tools (unreleased version)"
fi
fi
;;
run)
[ $# -gt 0 ] || usage