From cfc141a8d01891d1bbbf5a5d72f96acbfbce59e1 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Thu, 10 Jan 2019 09:29:48 +0100 Subject: [PATCH] [ci] Even more fixes --- ci/bootstrap.sh | 4 ---- ci/build.sh | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ci/bootstrap.sh b/ci/bootstrap.sh index d4f37106..b88688f6 100755 --- a/ci/bootstrap.sh +++ b/ci/bootstrap.sh @@ -14,7 +14,6 @@ log_info() { echo -e "$(log_datetime) \033[1;34m${@}\033[0m" } - log_error() { echo -e "$(log_datetime) \033[1;31mError: ${@}\033[0m" >&2 } @@ -30,7 +29,6 @@ run_cmd() { fi } - # merges conda cache folders # $1: Path to the main cache to keep. The directory must exist. # $2: Path to the extra cache to be merged into main cache @@ -46,7 +44,6 @@ merge_conda_cache() { fi } - # Checks just if the variable is defined and has non-zero length check_defined() { if [ -z "${!1+abc}" ]; then @@ -59,7 +56,6 @@ check_defined() { log_info "${1}=${!1}" } - # installs a miniconda installation. # $1: Path to where to install miniconda. install_miniconda() { diff --git a/ci/build.sh b/ci/build.sh index e4d32458..69c51257 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -15,6 +15,16 @@ log_error() { echo -e "$(log_datetime) \033[1;31mError: ${@}\033[0m" >&2 } +# Function for running command and echoing results +run_cmd() { + log_info "$ ${@}" + ${@} + local status=$? + if [ ${status} != 0 ]; then + log_error "Command Failed \"${@}\"" + exit ${status} + fi +} # Checks just if the variable is defined and has non-zero length check_defined() { @@ -52,8 +62,8 @@ else channel="http://www.idiap.ch/public/conda" fi -log_info "$ ${CONDA_ROOT}/bin/python ${CI_PROJECT_DIR}/_ci/nextbuild.py ${channel} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}" -BOB_BUILD_NUMBER=$(${CONDA_ROOT}/bin/python ${CI_PROJECT_DIR}/_ci/nextbuild.py ${channel} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}) +log_info "$ ${CONDA_ROOT}/bin/python ${CI_PROJECT_DIR}/ci/nextbuild.py ${channel} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}" +BOB_BUILD_NUMBER=$(${CONDA_ROOT}/bin/python ${CI_PROJECT_DIR}/ci/nextbuild.py ${channel} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION}) export_env BOB_BUILD_NUMBER # copy the recipe_append.yaml over before build @@ -70,6 +80,5 @@ run_cmd git clean -ffdx \ --exclude="miniconda/pkgs/*.tar.bz2" \ --exclude="miniconda/pkgs/urls.txt" \ --exclude="miniconda/conda-bld/${_os}-64/*.tar.bz2" \ - --exclude="_ci" \ --exclude="dist/*.zip" \ --exclude="sphinx" -- GitLab