diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 4762bb3def52428864d6dae2b4d1bfa1c65c14c7..5d1e0c77bc9613e2dd933850132f3255be61af57 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -346,31 +346,6 @@ install_miniconda() {
 }
 
 
-# deploys all conda packages built up to now
-# $1: the channel to upload to
-# $2: prefix of the package name to upload (may be empty)
-deploy_conda_packages() {
-  # Uploads all the built packages
-  for os in "osx-64" "noarch" "linux-64"; do
-    for f in ${CONDA_ROOT}/conda-bld/${os}/${2}*.tar.bz2; do
-      if [[ -f "${f}" ]]; then
-        dav_check_upload "${f}" "${1}/${os}/"
-      fi
-    done
-  done
-}
-
-
-# sets BOB_BUILD_NUMBER to the value of the next build number for the package
-# with the given specifications
-# $1: the channel to lookup
-set_next_bob_build_number() {
-  log_info "$ ${CONDA_ROOT}/bin/python ${SCRIPTS_DIR}/channel_support.py ${DOCSERVER}/${1} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}"
-  BOB_BUILD_NUMBER=$(${CONDA_ROOT}/bin/python ${SCRIPTS_DIR}/channel_support.py ${DOCSERVER}/${1} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION})
-  export_env BOB_BUILD_NUMBER
-}
-
-
 # sets CONDA_CHANNELS to the list of conda channels that should be considered
 # $1: visibility (maybe either "public" or "private")
 # $2: typically, the value of ${CI_COMMIT_TAG} or empty
@@ -396,6 +371,33 @@ set_conda_channels() {
 }
 
 
+# deploys all conda packages built up to now
+# $1: path on the remote server corresponding to one of the conda channels to
+#     upload to
+# $2: prefix of the package name to upload (may be empty to upload all
+#     available)
+deploy_conda_packages() {
+  local upload_path=$(echo "${1}" | sed -e 's/public/public-upload/;s/private/private-upload/')
+  for os in "osx-64" "noarch" "linux-64"; do
+    for f in ${CONDA_ROOT}/conda-bld/${os}/${2}*.tar.bz2; do
+      if [[ -f "${f}" ]]; then
+        dav_check_upload "${f}" "${upload_path}/${os}/"
+      fi
+    done
+  done
+}
+
+
+# sets BOB_BUILD_NUMBER to the value of the next build number for the package
+# with the given specifications
+# $1: the channel to lookup
+set_next_bob_build_number() {
+  log_info "$ ${CONDA_ROOT}/bin/python ${SCRIPTS_DIR}/channel_support.py ${DOCSERVER}/${1} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}"
+  BOB_BUILD_NUMBER=$(${CONDA_ROOT}/bin/python ${SCRIPTS_DIR}/channel_support.py ${DOCSERVER}/${1} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION})
+  export_env BOB_BUILD_NUMBER
+}
+
+
 check_env PYTHON_VERSION
 check_env CI_PROJECT_URL
 check_env CI_PROJECT_DIR