diff options
-rw-r--r-- | jenkins/dispatch.groovy | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index edd873b..24545a3 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -162,13 +162,18 @@ node(LABEL) { def cpkgs = "conda=${CONDA_VERSION} conda-build=${CONDA_BUILD_VERSION}" sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" - // Apply bugfix patch to conda_build 2.1.1 - 2.1.15 - (?) - def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + - "site-packages/conda_build/config.py" - def patches_dir = "${env.WORKSPACE}/patches" - def patchname = "conda_build_2.1.1_substr_fix_py${this.py_maj_version}.patch" - def full_patchname = "${patches_dir}/${patchname}" - sh "patch ${filename} ${full_patchname}" + // Apply bugfix patch only to conda_build 2.1.1 - 2.1.15 - (?) + conda_build_version = sh(script: "conda-build --version", returnStdout: true) + conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] + println("conda_build_maj_ver = ${conda_build_maj_ver}") + if (conda_build_major_ver == "2") { + def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + + "site-packages/conda_build/config.py" + def patches_dir = "${env.WORKSPACE}/patches" + def patchname = "conda_build_2.1.1_substr_fix_py${this.py_maj_version}.patch" + def full_patchname = "${patches_dir}/${patchname}" + sh "patch ${filename} ${full_patchname}" + } // Install support tools dir(this.utils_dir) { |