aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <mrendina@stsci.edu>2017-07-26 17:02:08 -0400
committerMatt Rendina <mrendina@stsci.edu>2017-07-26 17:02:08 -0400
commit8f162aebf9a031921bba326c70291b3aa60931e1 (patch)
tree38b7ecddbbd0f2b34be6e5852e83370cf4509889
parentbbda947ee30da3685a9cc87191380bfc40bca21d (diff)
downloadbuild_control-8f162aebf9a031921bba326c70291b3aa60931e1.tar.gz
Only patch conda-build 2.x for bugfix now in conda-build 3.x
-rw-r--r--jenkins/dispatch.groovy19
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) {