diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2017-07-26 17:23:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-26 17:23:06 -0400 |
commit | 3c801b4ade4a8a50d43094596e9677b11e50c1be (patch) | |
tree | 9e34c9f764338a7df7430e5ae376495886da4763 /jenkins | |
parent | bbda947ee30da3685a9cc87191380bfc40bca21d (diff) | |
parent | 4d3db8f8ac12dbb6baf00dc6afe15135ba8404ce (diff) | |
download | build_control-3c801b4ade4a8a50d43094596e9677b11e50c1be.tar.gz |
Merge pull request #20 from rendinam/patch_on_version
Patch based on conda-build version
Diffstat (limited to 'jenkins')
-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..7dd09e0 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.x + def conda_build_version = sh(script: "conda-build --version", returnStdout: true) + def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] + if (conda_build_maj_ver == "2") { + println("conda-build major version ${conda_build_maj_ver} detected. Applying bugfix patch.") + 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) { |