diff --git a/gitlab/build.sh b/gitlab/build.sh index a654fd30cee7a1175e04b311d41fa716207d5eb7..4347b56cd04163364a3dc692c3cb91671c12866f 100755 --- a/gitlab/build.sh +++ b/gitlab/build.sh @@ -9,17 +9,25 @@ export_env PATH run_cmd mkdir -p ./_ci/${OS_SLUG}/${PYTHON_VERSION} -if [ -z "${CI_COMMIT_TAG}" ]; then - run_cmd ${CONDA_ROOT}/bin/python _ci/channel_support.py ${CONDA_BETA_CHANNEL} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION} -u --log ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt -else - run_cmd ${CONDA_ROOT}/bin/python _ci/channel_support.py ${CONDA_CHANNEL} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION} -u --log ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt - +if [ -z "${BOB_BUILD_NUMBER}" ]; then + if [ -z "${CI_COMMIT_TAG}" ]; then + run_cmd ${CONDA_ROOT}/bin/python _ci/channel_support.py ${CONDA_BETA_CHANNEL} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION} -u --log ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt + else + run_cmd ${CONDA_ROOT}/bin/python _ci/channel_support.py ${CONDA_CHANNEL} ${CI_PROJECT_NAME} ${BOB_PACKAGE_VERSION} ${PYTHON_VERSION} -u --log ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt + fi + + BOB_BUILD_NUMBER=`head -n 1 ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt | tr -d '\n'` + export_env BOB_BUILD_NUMBER fi -BOB_BUILD_NUMBER=`head -n 1 ./_ci/${OS_SLUG}/${PYTHON_VERSION}/build_number.txt | tr -d '\n'` -export_env BOB_BUILD_NUMBER - # copy the recipe_append.yaml over before build run_cmd cp ./_ci/recipe_append.yaml conda/recipe_append.yaml -run_cmd ${CONDA_ROOT}/bin/conda build --no-anaconda-upload --variant-config-files _ci/conda_build_config.yaml --python=${PYTHON_VERSION} conda +BLDOPT="--no-anaconda-upload" +BLDOPT="${BLDOPT} --variant-config-files _ci/conda_build_config.yaml" +BLDOPT="${BLDOPT} --python=${PYTHON_VERSION}" +if [ -n "${BOB_TEST_ONLY}" ]; then + BLDOPT="${BLDOPT} --test" +fi + +run_cmd ${CONDA_ROOT}/bin/conda build ${BLDOPT} conda