updated teamcity_api.sh

pull/2/head
Hari Sekhon 4 years ago
parent d54aea01e9
commit fc0471bc8e

@ -158,6 +158,8 @@ else
read -r -a CURL_OPTS <<< "-sS --fail --connect-timeout 3"
fi
# case insensitive regex matching
shopt -s nocasematch
# XML by default :-/
if ! [[ "$*" =~ Accept: ]]; then
CURL_OPTS+=(-H "Accept: application/json")
@ -165,6 +167,8 @@ fi
if ! [[ "$*" =~ Content-Type: ]]; then
CURL_OPTS+=(-H "Content-Type: application/json")
fi
# unset to return to default setting for safety to avoid hard to debug changes of behaviour elsewhere
shopt -u nocasematch
# don't enforce as hard requirements here, instead try alternation further down and construct from what's available
#check_env_defined "TEAMCITY_URL"

Loading…
Cancel
Save