|
@ -2,10 +2,29 @@ |
|
|
|
|
|
|
|
|
set -e |
|
|
set -e |
|
|
|
|
|
|
|
|
if [ "$API_KEY" != "**None**" ]; then |
|
|
|
|
|
|
|
|
replace_in_index () { |
|
|
|
|
|
if [ "$1" != "**None**" ]; then |
|
|
sed -i "s|/\*||g" index.html |
|
|
sed -i "s|/\*||g" index.html |
|
|
sed -i "s|\*/||g" index.html |
|
|
sed -i "s|\*/||g" index.html |
|
|
sed -i "s|myApiKeyXXXX123456789|$API_KEY|g" index.html |
|
|
|
|
|
|
|
|
sed -i "s|$1|$2|g" index.html |
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
replace_or_delete_in_index () { |
|
|
|
|
|
if [ -z "$2" ]; then |
|
|
|
|
|
sed -i "/$1/d" index.html |
|
|
|
|
|
else |
|
|
|
|
|
replace_in_index $1 $2 |
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
replace_in_index myApiKeyXXXX123456789 $API_KEY |
|
|
|
|
|
replace_or_delete_in_index your-client-id $OAUTH_CLIENT_ID |
|
|
|
|
|
replace_or_delete_in_index your-client-secret-if-required $OAUTH_CLIENT_SECRET |
|
|
|
|
|
replace_or_delete_in_index your-realms $OAUTH_REALM |
|
|
|
|
|
replace_or_delete_in_index your-app-name $OAUTH_APP_NAME |
|
|
|
|
|
if [ "$OAUTH_ADDITIONAL_PARAMS" != "**None**" ]; then |
|
|
|
|
|
replace_in_index "additionalQueryStringParams: {}" "additionalQueryStringParams: {$OAUTH_ADDITIONAL_PARAMS}" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [[ -f $SWAGGER_JSON ]]; then |
|
|
if [[ -f $SWAGGER_JSON ]]; then |
|
|