Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/util/bitbucket/populate_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
echo "!!! Warning !!! This may break your Bitbucket instance. Also, note that downgrade is not supported by Bitbucket."
# Check if --force flag is passed into command
if [[ "$1" == "--force" ]]; then
# Check if version was specified after --force flag
if [[ -z "$2" ]]; then
echo "Error: --force flag requires version after it."
echo "Specify one of these versions: ${SUPPORTED_BITBUCKET_VERSIONS[*]}"
exit 1
fi
# Check if passed Bitbucket version is in list of supported
if [[ "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${2} ]]; then
if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[@]} " =~ " ${2} " ]]; then
DB_DUMP_URL="${DATASETS_AWS_BUCKET}/$2/${DATASETS_SIZE}/${DB_DUMP_NAME}"
echo "Force mode. Dataset URL: ${DB_DUMP_URL}"
else
Expand Down
8 changes: 7 additions & 1 deletion app/util/confluence/populate_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ if [[ ! "${SUPPORTED_CONFLUENCE_VERSIONS[*]}" =~ ${CONFLUENCE_VERSION} ]]; then
echo "!!! Warning !!! This may break your Confluence instance. Also, note that downgrade is not supported by Confluence."
# Check if --force flag is passed into command
if [[ "$1" == "--force" ]]; then
# Check if version was specified after --force flag
if [[ -z "$2" ]]; then
echo "Error: --force flag requires version after it."
echo "Specify one of these versions: ${SUPPORTED_CONFLUENCE_VERSIONS[*]}"
exit 1
fi
# Check if passed Confluence version is in list of supported
if [[ "${SUPPORTED_CONFLUENCE_VERSIONS[*]}" =~ ${2} ]]; then
if [[ " ${SUPPORTED_CONFLUENCE_VERSIONS[@]} " =~ " ${2} " ]]; then
DB_DUMP_URL="${DATASETS_AWS_BUCKET}/$2/${DATASETS_SIZE}/${DB_DUMP_NAME}"
echo "Force mode. Dataset URL: ${DB_DUMP_URL}"
else
Expand Down
8 changes: 7 additions & 1 deletion app/util/jira/populate_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,14 @@ if [[ ! "${SUPPORTED_VERSIONS[*]}" =~ ${JIRA_VERSION} ]]; then
echo "!!! Warning !!! This may break your Jira instance."
# Check if --force flag is passed into command
if [[ ${force} == 1 ]]; then
# Check if version was specified after --force flag
if [[ -z ${version} ]]; then
echo "Error: --force flag requires version after it."
echo "Specify one of these versions: ${SUPPORTED_VERSIONS[*]}"
exit 1
fi
# Check if passed Jira version is in list of supported
if [[ "${SUPPORTED_VERSIONS[*]}" =~ ${version} ]]; then
if [[ " ${SUPPORTED_VERSIONS[@]} " =~ " ${version} " ]]; then
DB_DUMP_URL="${DATASETS_AWS_BUCKET}/${version}/${DATASETS_SIZE}/${DB_DUMP_NAME}"
echo "Force mode. Dataset URL: ${DB_DUMP_URL}"
# If there is no DOWNGRADE_OPT - set it
Expand Down