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

Colorize remaining ci commands

parent a1c3eed1
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
# Functions for coloring echo commands
red_echo() {
echo -e "\033[1;31m${@}\033[0m"
}
green_echo() {
echo -e "\033[1;32m${@}\033[0m"
}
if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${DOCSERVER}" ]; then
echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - cannot upload";
red_echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting...";
exit 1
fi
......@@ -18,9 +27,9 @@ echo "runner=${CI_RUNNER_DESCRIPTION}" >> ${info}
file=${CI_PROJECT_NAME}-${CI_BUILD_REF}.tar.bz2
tar cfj ${file} sphinx
echo "[>>] Uploading ${file}..."
green_echo "[>>] Uploading ${file}..."
curl --silent --user "${DOCUSER}:${DOCPASS}" --upload-file ${file} ${DOCSERVER}/software/bob/docs-upload/
if [ $? != 0 ]; then
echo "[error] curl command finished with an error condition"
red_echo "[error] curl command finished with an error condition"
exit 1
fi
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:06:56 CEST
# Functions for coloring echo commands
red_echo() {
echo -e "\033[1;31m${@}\033[0m"
}
green_echo() {
echo -e "\033[1;32m${@}\033[0m"
}
if [ -z "${DOCUSER}" ] || [ -z "${DOCPASS}" ] || [ -z "${DOCSERVER}" ]; then
echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - cannot upload";
red_echo "DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting...";
exit 1
fi
for file in dist/*.whl; do
echo "[>>] Uploading ${file}..."
green_echo "[>>] Uploading ${file}..."
curl --silent --user "${DOCUSER}:${DOCPASS}" --upload-file ${file} ${DOCSERVER}/software/bob/wheels-upload/gitlab/
if [ $? != 0 ]; then
echo "[error] curl command finished with an error condition"
red_echo "[error] curl command finished with an error condition"
exit 1
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment