Skip to content
Snippets Groups Projects
Commit e10fcc7f authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Improve logging

parent 7aec8d73
Branches
No related tags found
No related merge requests found
......@@ -230,7 +230,7 @@ dav_mkdir() {
# Deletes a file/folder from our intranet location via curl
# $1: Path to the file/folder to delete (e.g. dist/myfile.whl)
dav_delete() {
log_info "curl: EXISTS ${1}?"
log_info "curl: EXISTS ${DOCSERVER}/${1}?"
# checks if the directory exists before trying to remove it (use --head)
local code=$(curl --location --silent --fail --write-out "%{http_code}" --head --user "${DOCUSER}:${DOCPASS}" "${DOCSERVER}/$1")
......@@ -239,11 +239,11 @@ dav_delete() {
return 0
fi
log_info "curl: DELETE ${1}..."
log_info "curl: DELETE ${DOCSERVER}/${1}..."
code=$(curl --location --silent --fail --write-out "%{http_code}" --user "${DOCUSER}:${DOCPASS}" -X DELETE "${DOCSERVER}/$1")
if [[ ${code} == *204 || ${code} == *201 ]]; then
log_info "Successfully deleted ${1} with curl"
log_info "Successfully deleted ${DOCSERVER}/${1} with curl"
else
log_error "Curl command finished with an error condition (code=${code}):"
curl --location --silent --user "${DOCUSER}:${DOCPASS}" -X DELETE "${DOCSERVER}/$1"
......@@ -421,7 +421,7 @@ export_env SSL_CERT_FILE
# See: https://gitlab.idiap.ch/bob/bob.admin/issues/2
# Prefix differs between private & public repos
DOC_SERVER_PREFIX="-upload/docs/${CI_PROJECT_PATH}/"
DOC_SERVER_PREFIX="-upload/docs/${CI_PROJECT_PATH}"
if [[ "${VISIBILITY}" == "public" ]]; then
DOC_SERVER_PREFIX="public${DOC_SERVER_PREFIX}"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment