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: 4 additions & 4 deletions app/util/bitbucket/populate_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
echo "e.g. ./populate_db.sh --force 6.10.0"
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
if [[ ${force} == 1 ]]; then
# Check if version was specified after --force flag
if [[ -z "$2" ]]; then
if [[ -z ${version} ]]; 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
DB_DUMP_URL="${DATASETS_AWS_BUCKET}/$2/${DATASETS_SIZE}/${DB_DUMP_NAME}"
if [[ " ${SUPPORTED_BITBUCKET_VERSIONS[@]} " =~ " ${version} " ]]; then
DB_DUMP_URL="${DATASETS_AWS_BUCKET}/${version}/${DATASETS_SIZE}/${DB_DUMP_NAME}"
echo "Force mode. Dataset URL: ${DB_DUMP_URL}"
else
LAST_DATASET_VERSION=${SUPPORTED_BITBUCKET_VERSIONS[${#SUPPORTED_BITBUCKET_VERSIONS[@]}-1]}
Expand Down
6 changes: 3 additions & 3 deletions app/util/bitbucket/upload_attachments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ if [[ ! "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${BITBUCKET_VERSION} ]]; then
echo "e.g. ./upload_attachments --force 6.10.0"
echo "!!! Warning !!! This may broke your Bitbucket instance."
# Check if --force flag is passed into command
if [[ "$1" == "--force" ]]; then
if [[ ${force} == 1 ]]; then
# Check if passed Bitbucket version is in list of supported
if [[ "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${2} ]]; then
ATTACHMENTS_TAR_URL="${DATASETS_AWS_BUCKET}/$2/${DATASETS_SIZE}/${ATTACHMENTS_TAR}"
if [[ "${SUPPORTED_BITBUCKET_VERSIONS[*]}" =~ ${version} ]]; then
ATTACHMENTS_TAR_URL="${DATASETS_AWS_BUCKET}/${version}/${DATASETS_SIZE}/${ATTACHMENTS_TAR}"
echo "Force mode. Dataset URL: ${ATTACHMENTS_TAR_URL}"
else
LAST_DATASET_VERSION=${SUPPORTED_BITBUCKET_VERSIONS[${#SUPPORTED_BITBUCKET_VERSIONS[@]}-1]}
Expand Down
2 changes: 1 addition & 1 deletion app/util/confluence/upload_attachments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fi

echo "Step1: Download msrcync"
# https://github.com/jbd/msrsync
cd ${TMP_DIR} || exit
cd ${TMP_DIR} || exit 1
if [[ -s msrsync ]]; then
echo "msrsync already downloaded"
else
Expand Down
2 changes: 1 addition & 1 deletion app/util/jira/upload_attachments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fi

echo "Step1: Download msrcync"
# https://github.com/jbd/msrsync
cd ${TMP_DIR}
cd ${TMP_DIR} || exit 1
if [[ -s msrsync ]]; then
echo "msrsync already downloaded"
else
Expand Down