File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,14 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
4949 echo " !!! Warning !!! This may break your Bitbucket instance. Also, note that downgrade is not supported by Bitbucket."
5050 # Check if --force flag is passed into command
5151 if [[ " $1 " == " --force" ]]; then
52+ # Check if version was specified after --force flag
53+ if [[ -z " $2 " ]]; then
54+ echo " Error: --force flag requires version after it."
55+ echo " Specify one of these versions: ${SUPPORTED_BITBUCKET_VERSIONS[*]} "
56+ exit 1
57+ fi
5258 # Check if passed Bitbucket version is in list of supported
53- if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[*]} " =~ ${2} ]]; then
59+ if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[@]} " =~ " ${2} " ]]; then
5460 DB_DUMP_URL=" ${DATASETS_AWS_BUCKET} /$2 /${DATASETS_SIZE} /${DB_DUMP_NAME} "
5561 echo " Force mode. Dataset URL: ${DB_DUMP_URL} "
5662 else
Original file line number Diff line number Diff line change @@ -53,8 +53,14 @@ if [[ ! "${SUPPORTED_CONFLUENCE_VERSIONS[*]}" =~ ${CONFLUENCE_VERSION} ]]; then
5353 echo " !!! Warning !!! This may break your Confluence instance. Also, note that downgrade is not supported by Confluence."
5454 # Check if --force flag is passed into command
5555 if [[ " $1 " == " --force" ]]; then
56+ # Check if version was specified after --force flag
57+ if [[ -z " $2 " ]]; then
58+ echo " Error: --force flag requires version after it."
59+ echo " Specify one of these versions: ${SUPPORTED_CONFLUENCE_VERSIONS[*]} "
60+ exit 1
61+ fi
5662 # Check if passed Confluence version is in list of supported
57- if [[ " ${SUPPORTED_CONFLUENCE_VERSIONS[*]} " =~ ${2} ]]; then
63+ if [[ " ${SUPPORTED_CONFLUENCE_VERSIONS[@]} " =~ " ${2} " ]]; then
5864 DB_DUMP_URL=" ${DATASETS_AWS_BUCKET} /$2 /${DATASETS_SIZE} /${DB_DUMP_NAME} "
5965 echo " Force mode. Dataset URL: ${DB_DUMP_URL} "
6066 else
Original file line number Diff line number Diff line change @@ -90,8 +90,14 @@ if [[ ! "${SUPPORTED_VERSIONS[*]}" =~ ${JIRA_VERSION} ]]; then
9090 echo " !!! Warning !!! This may break your Jira instance."
9191 # Check if --force flag is passed into command
9292 if [[ ${force} == 1 ]]; then
93+ # Check if version was specified after --force flag
94+ if [[ -z ${version} ]]; then
95+ echo " Error: --force flag requires version after it."
96+ echo " Specify one of these versions: ${SUPPORTED_VERSIONS[*]} "
97+ exit 1
98+ fi
9399 # Check if passed Jira version is in list of supported
94- if [[ " ${SUPPORTED_VERSIONS[*]} " =~ ${version} ]]; then
100+ if [[ " ${SUPPORTED_VERSIONS[@]} " =~ " ${version} " ]]; then
95101 DB_DUMP_URL=" ${DATASETS_AWS_BUCKET} /${version} /${DATASETS_SIZE} /${DB_DUMP_NAME} "
96102 echo " Force mode. Dataset URL: ${DB_DUMP_URL} "
97103 # If there is no DOWNGRADE_OPT - set it
You can’t perform that action at this time.
0 commit comments