Files
sdkman-cli/bin/release-binary.sh
Ross Goldberg 03573e5d8e Reformat .sh files manually & with EditorConfig
Standardize the formatting of .sh files using auto-formatting specified
in .editorconfig, plus some manual reformatting that conforms to
.editorconfig:

 - Fix improper indents
 - Use 4-character-wide tabs for indents
 - Append () to function names in function declarations
 - Only one empty line at end of file
 - Add or remove empty lines
 - Insert initial spaces in comments
 - Removed unnecessary semicolons
 - Spread conditionals over multiple lines
 - Other minor spacing & format cleanup
2020-04-07 15:31:45 +01:00

24 lines
544 B
Bash
Executable File

#!/usr/bin/env bash
BRANCH="$1"
BUILD_NUMBER="$2"
MONGO_URL="$3"
MONGO_USERNAME="$4"
MONGO_PASSWORD="$5"
VERSION="$BRANCH+$BUILD_NUMBER"
if [[ -z "$MONGO_USERNAME" || -z "$MONGO_PASSWORD" ]]; then
echo "No mongo credentials so doing nothing..."
return 0
fi
if [[ "$BRANCH" == 'master' ]]; then
FIELD="betaCliVersion"
else
FIELD="stableCliVersion"
fi
echo "Release: $FIELD $VERSION"
mongo ${MONGO_URL} --username=${MONGO_USERNAME} --password=${MONGO_PASSWORD} -eval "db.application.updateOne({}, {\$set: { \"$FIELD\": \"$VERSION\"}});"