summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xleap-platform-test25
1 files changed, 24 insertions, 1 deletions
diff --git a/leap-platform-test b/leap-platform-test
index e8f267d..708e9e9 100755
--- a/leap-platform-test
+++ b/leap-platform-test
@@ -12,6 +12,7 @@ OPTIONS
-c|--config file specify config file
-a|--all run command on all nodes
+ -V|--versions show versions/git revision of leap_cli and leap_platoform in provider dir
-h|--help show help
COMMANDS
@@ -179,20 +180,41 @@ wait_for_node() {
versions () {
cd $PLATFORMDIR
platform_head=`git rev-parse HEAD`
+ platform_commit=`git show | head -5`
cd $LEAP_CLI_DIR
cli_head=`git rev-parse HEAD`
if cli_head='edcb76a30bc0e13b9bf590cbd9f7f12d41a2cc13'
then
+ # rebased vagrant_1.2 commit, take the last one for latest master commit
cli_head=`git rev-parse HEAD^`
fi
+ cli_commit=`git show $cli_head | head -5`
cd $PROVIDERDIR
[ -d .git ] && provider_head=`git rev-parse HEAD`
+ if [ -n $provider_head ]
+ then
+ provider_head='not under version control'
+ fi
+ echo "Provider:"
+ echo
echo "provider ($PROVIDERDIR): $provider_head"
+ echo
+
+ echo "leap_cli:"
+ echo
echo leap cli: $cli_head
- leap -v 2 list | egrep '( = leap command v| = leap platform v)'
+ leap -v 2 list | grep ' = leap command v'
+ echo "$cli_commit"
+ echo
+
+ echo "leap_platform:"
+ leap -v 2 list | grep ' = leap platform v'
+ echo "$platform_commit"
+ echo
+ echo
}
@@ -255,6 +277,7 @@ if $print_versions
then
versions=`versions`
echo "$versions"
+ echo
exit 0
fi