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

Fix deployment

parent fa7294b0
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ setup check sdist --formats zip upload --repository staging
# if that worked, uploads documentation to pythonhosted if any exists
if [ -d sphinx ]; then
log_info "Uploading documentation to pythonhosted on behalf of ${PYPIUSER}..."
setup upload_docs --upload-dir sphinx
setup upload_docs --upload-dir sphinx --repository production
fi
# if that worked, uploads source package to the production index
......
......@@ -67,9 +67,12 @@ setup() {
# Prepares ~/.pypirc
dot_pypirc() {
check_env PYPISERVER
log_info "Creating ~/.pypirc..."
cat <<EOT >> ~/.pypirc
local rc=${HOME}/.pypirc
log_info "Creating ${rc}..."
if [ -e ${rc} ]; then
run_cmd rm -f ${rc}
fi
cat <<EOT >> ${rc}
[distutils]
index-servers =
production
......@@ -85,15 +88,12 @@ repository: ${TESTSERVER}
username: ${PYPIUSER}
password: ${PYPIPASS}
EOT
run_cmd chmod 600 ~/.pypirc
run_cmd chmod 600 ${rc}
}
# Uploads a file to our intranet location via curl
doc_upload() {
check_env DOCSERVER
check_pass DOCUSER
check_pass DOCPASS
log_info "curl: ${1} -> ${DOCSERVER}/${2}..."
curl --location --silent --show-error --user "${DOCUSER}:${DOCPASS}" --upload-file ${1} ${DOCSERVER}/${2}
local status=$?
......
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