use 'odo version --client' in sh scripts (#1249)

* use 'odo version --client' in sh scripts

'odo version --client' will show just odo version without attempting to
connect to a cluster
This commit is contained in:
Tomas Kral
2019-01-29 12:23:10 +01:00
committed by Georgios Andrianakis
parent 31e898e60c
commit 3e2a0aebac
3 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ PKG_VERSION=$(date "+%Y%m%d%H%M%S")
if [[ -n $TRAVIS_TAG ]]; then
echo "Checking if odo version was set to the same version as current tag"
# use sed to get only semver part
bin_version=$(${BIN_DIR}/linux-amd64/odo version | head -1 | sed "s/^odo \(.*\) (.*)$/\1/")
bin_version=$(${BIN_DIR}/linux-amd64/odo version --client | head -1 | sed "s/^odo \(.*\) (.*)$/\1/")
if [ "$TRAVIS_TAG" == "${bin_version}" ]; then
echo "OK: odo version output is matching current tag"
else

View File

@@ -99,7 +99,7 @@ install_odo() {
if command_exists odo; then
echo_stderr "#
odo version \"$(odo version)\" is already installed on your system, running this installer script might case issues with your current installation. If you want to install odo using this script, please remove the current installation of odo from you system.
odo version \"$(odo version --client)\" is already installed on your system, running this installer script might case issues with your current installation. If you want to install odo using this script, please remove the current installation of odo from you system.
Aborting now!
"
exit 1
@@ -221,7 +221,7 @@ verify_odo() {
if command_exists odo; then
echo "
# Verification complete!
# odo version \"$(odo version)\" has been installed at $(type -P odo)
# odo version \"$(odo version --client)\" has been installed at $(type -P odo)
"
else
echo_stderr "

View File

@@ -11,7 +11,7 @@ mkdir -p $RELEASE_DIR
if [[ -n $TRAVIS_TAG ]]; then
echo "Checking if odo version was set to the same version as current tag"
# use sed to get only semver part
bin_version=$(${BIN_DIR}/linux-amd64/odo version | head -1 | sed "s/^odo \(.*\) (.*)$/\1/")
bin_version=$(${BIN_DIR}/linux-amd64/odo version --client | head -1 | sed "s/^odo \(.*\) (.*)$/\1/")
if [ "$TRAVIS_TAG" == "${bin_version}" ]; then
echo "OK: odo version output is matching current tag"
else