From eb636671992d888644734c75bbc5271b00a287fe Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Fri, 23 Sep 2016 15:01:10 +0200 Subject: [PATCH] Fix deployment --- gitlab/deploy.sh | 2 +- gitlab/functions.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gitlab/deploy.sh b/gitlab/deploy.sh index d3c7572..1221b18 100755 --- a/gitlab/deploy.sh +++ b/gitlab/deploy.sh @@ -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 diff --git a/gitlab/functions.sh b/gitlab/functions.sh index e226657..e7f6c3a 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -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=$? -- GitLab