diff options
Diffstat (limited to 'vars/utils.groovy')
-rw-r--r-- | vars/utils.groovy | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy index 2fb8fe5..57c9ef6 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -527,13 +527,16 @@ def buildAndTest(config) { // Remove 'prefix' line as it isn't needed and complicates the // addition of the 'pip' section. sh(script: "sed -i '/prefix/d' '${dump_name}'") + // Remove any blank lines + sh(script: "sed -i '/^ *\$/d' '${dump_name}'") def pip_section = sh(script: "grep 'pip:' '${dump_name}'", returnStatus: true) + // Add 'pip' section if one is not already present. if (pip_section != 0) { sh "echo ' - pip:' >> '${dump_name}'" } // Add git+https line in pip section to install the commit // used for the target project of this job. - def extra_yml_1 = " - ${remote_repo}@${commit}" + def extra_yml_1 = " - git+${remote_repo}@${commit}" sh "echo '${extra_yml_1}' >> '${dump_name}'" // Stash spec file for use on master node. |