Skip to content
Snippets Groups Projects
Commit 6c714ae3 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Setup condarc in pypi pushes as well

parent 97b6a9a4
No related branches found
No related tags found
No related merge requests found
......@@ -12,21 +12,7 @@ mkdir -p ${CONDA_ROOT}/pkgs
touch ${CONDA_ROOT}/pkgs/urls
touch ${CONDA_ROOT}/pkgs/urls.txt
cat <<EOF > ${CONDARC}
default_channels: #!final
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/free
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/pro
add_pip_as_python_dependency: false #!final
changeps1: false #!final
always_yes: true #!final
quiet: true #!final
show_channel_urls: true #!final
anaconda_upload: false #!final
ssl_verify: false #!final
channels: #!final
EOF
create_condarc ${CONDARC}
if [[ "${STABLE}" == "true" ]]; then
set_conda_channels ${VISIBILITY} "stable"
......
......@@ -367,6 +367,30 @@ install_miniconda() {
}
# Creates a sane base condarc file
# $1: Path to where to populate the condarc file
create_condarc() {
log_info "Populating the basic condarc file in ${1} ..."
cat <<EOF > ${1}
default_channels: #!final
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/free
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/pro
add_pip_as_python_dependency: false #!final
changeps1: false #!final
always_yes: true #!final
quiet: true #!final
show_channel_urls: true #!final
anaconda_upload: false #!final
ssl_verify: false #!final
channels: #!final
EOF
}
# 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
......
......@@ -3,6 +3,8 @@
source $(dirname ${0})/functions.sh
create_condarc ${CONDARC}
if [ "${VISIBILITY}" != "public" ]; then
log_warn "WARNING: You cannot publish a PRIVATE to PyPI"
log_warn "WARNING: Make this package public if you wish to do so next time"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment