diff --git a/ci/bootstrap.sh b/ci/bootstrap.sh index c72e08b9c5262aa29359dabeaafe653f235c495c..ee4611cc5abad7db00929d2c2eefcc483f5a3d6d 100755 --- a/ci/bootstrap.sh +++ b/ci/bootstrap.sh @@ -96,9 +96,20 @@ install_miniconda() { hash -r } + +# Exports a given environment variable, verbosely +export_env() { + check_defined "${1}" + export ${1} + log_info "export ${1}=${!1}" +} + check_defined CONDA_ROOT check_defined CI_PROJECT_DIR +CONDARC=${CONDA_ROOT}/condarc +export_env CONDARC + # checks if a conda installation exists. Otherwise, installs one if [ ! -e ${CONDA_ROOT}/bin/conda ]; then install_miniconda ${CONDA_ROOT} diff --git a/ci/build.sh b/ci/build.sh index 92609b05750bdd6ada8837af57f76f83fbf0c24e..010a1050d1c960900f1324865dc21a6ad26dfc70 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -41,8 +41,11 @@ check_defined CI_PROJECT_NAME check_defined CI_COMMIT_TAG check_defined PYTHON_VERSION +CONDARC=${CONDA_ROOT}/condarc +export_env CONDARC + BOB_PACKAGE_VERSION=`cat version.txt | tr -d '\n'`; -check_defined BOB_PACKAGE_VERSION +export_env BOB_PACKAGE_VERSION # Makes sure we activate the base environment if available run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh