aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2017-04-18 14:02:00 -0400
committerGitHub <noreply@github.com>2017-04-18 14:02:00 -0400
commitf6ebcdb2f3a5ac7ea239a0e0174da1b9dd0d4a4b (patch)
treef2452adf2a6d9fb87c4b39bd727b1ff1dbeaeab1
parent8923d88d42e14f9853cb79f87d403e971d11ef8e (diff)
parenta12a35e8fc3742aa19f31d66e5cef15f823ba834 (diff)
downloadbuild_control-f6ebcdb2f3a5ac7ea239a0e0174da1b9dd0d4a4b.tar.gz
Merge pull request #8 from astroconda/method_change
Use tokenize to avoid needing regex syntax
-rw-r--r--jenkins/dispatch.groovy4
1 files changed, 2 insertions, 2 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy
index 3c2080a..227d1fd 100644
--- a/jenkins/dispatch.groovy
+++ b/jenkins/dispatch.groovy
@@ -60,7 +60,7 @@ node(LABEL) {
println("PY_VERSION = ${PY_VERSION}")
assert PY_VERSION != null
assert PY_VERSION != "py_version-DEFAULTVALUE"
- this.py_maj_version = "${PY_VERSION.split(".")[0]}"
+ this.py_maj_version = "${PY_VERSION.tokenize(".")[0]}"
// Inherited from env() assignment performed in the generator
// DSL script.
@@ -80,7 +80,7 @@ node(LABEL) {
def dl_cmd = null
def stat1 = 999
for (cmd in dl_cmds) {
- stat1 = sh(script: "which ${cmd.split()[0]}", returnStatus: true)
+ stat1 = sh(script: "which ${cmd.tokenize()[0]}", returnStatus: true)
if( stat1 == 0 ) {
dl_cmd = cmd
break