##// END OF EJS Templates
feat(dev-tools): check version if no arg is given
super-admin -
Show More
@@ -579,7 +579,7 b' dev_tools_stack_cli_version_usage() {'
579 printf "dev-tools stack-cli-version - set the version for rcstack\n\n"
579 printf "dev-tools stack-cli-version - set the version for rcstack\n\n"
580
580
581 printf "%s\n" "Usage:"
581 printf "%s\n" "Usage:"
582 printf " dev-tools stack-cli-version VERSION\n"
582 printf " dev-tools stack-cli-version [VERSION]\n"
583 printf " dev-tools stack-cli-version --help | -h\n"
583 printf " dev-tools stack-cli-version --help | -h\n"
584 echo
584 echo
585
585
@@ -1668,6 +1668,13 b' dev_tools_stack_cli_version_command() {'
1668 # src/stack_cli_version_command.sh
1668 # src/stack_cli_version_command.sh
1669 version=${args[version]}
1669 version=${args[version]}
1670 version_file=$(pwd)/VERSION
1670 version_file=$(pwd)/VERSION
1671
1672 if [[ -z $version ]]; then
1673 echo "Current version is:"
1674 echo $(cat $version_file)
1675 exit 0
1676 fi
1677
1671 yaml_file=$(pwd)/scripts/rcstack/src/bashly.yml
1678 yaml_file=$(pwd)/scripts/rcstack/src/bashly.yml
1672
1679
1673 echo "Setting $version to $version_file"
1680 echo "Setting $version to $version_file"
@@ -3244,13 +3251,6 b' dev_tools_stack_cli_version_parse_requirements() {'
3244 esac
3251 esac
3245 done
3252 done
3246
3253
3247 # :command.required_args_filter
3248 if [[ -z ${args['version']+x} ]]; then
3249 printf "missing required argument: VERSION\nusage: dev-tools stack-cli-version VERSION\n" >&2
3250
3251 exit 1
3252 fi
3253
3254 }
3254 }
3255
3255
3256 # :command.parse_requirements
3256 # :command.parse_requirements
General Comments 0
You need to be logged in to leave comments. Login now