Skip to content

Commit

Permalink
Addded version function
Browse files Browse the repository at this point in the history
Signed-off-by: Yussuf <yussuf@us.ibm.com>
  • Loading branch information
yussufsh committed Dec 10, 2020
1 parent 1f86e01 commit fec0332
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion openshift-install-powervs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ limitations under the License.
'
#-------------------------------------------------------------------------
set -e
VERSION="v0.5.0-beta"

#-------------------------------------------------------------------------
# Display help
Expand Down Expand Up @@ -40,6 +41,7 @@ Where <args>:
-var-file Terraform variable file name in current directory. (By default using var.tfvars)
-force-destroy Not ask for confirmation during destroy command
-all-images List all the images available during variables prompt
-version, -v Display the script version
Submit issues at: https://github.com/ocp-power-automation/openshift-install-power/issues
Expand Down Expand Up @@ -1063,7 +1065,10 @@ function setup {
success "setup command completed!"
}


function display_version {
echo "Version $VERSION"
exit 0
}

function main {
mkdir -p ./logs
Expand Down Expand Up @@ -1113,6 +1118,9 @@ function main {
set -x
TRACE=1
;;
"-version"|"-v")
display_version
;;
"-verbose")
warn "Enabling verbose for terraform console"
TF_TRACE=1
Expand Down

0 comments on commit fec0332

Please sign in to comment.