diff --git a/jenkins/jenkins_home/config.xml b/jenkins/jenkins_home/config.xml index f1bfd28..e4def5c 100644 --- a/jenkins/jenkins_home/config.xml +++ b/jenkins/jenkins_home/config.xml @@ -1,7 +1,7 @@ - 2.387.3 + 2.426.3 2 NORMAL true diff --git a/node-scripts/spec/pipeline3/scripts.spec.js b/node-scripts/spec/pipeline3/scripts.spec.js index 3ec4263..3098492 100644 --- a/node-scripts/spec/pipeline3/scripts.spec.js +++ b/node-scripts/spec/pipeline3/scripts.spec.js @@ -419,7 +419,7 @@ describe("Scripts", function() { var filename = ".env"; expect(scripts.writeProperty(envVar, value, filename)).toEqual( - 'if ! grep -R "^[#]*s*KEY.*" .env > /dev/null; then\n' + + 'if ! grep -w "KEY" .env > /dev/null; then\n' + "\techo \"'KEY' is not found in file '.env'. Appending...\"\n" + '\techo "KEY=a/path/on/the/disk" >> .env\n' + "else\n" + diff --git a/node-scripts/src/pipeline3/scripts.js b/node-scripts/src/pipeline3/scripts.js index 8a7063e..0003cf4 100644 --- a/node-scripts/src/pipeline3/scripts.js +++ b/node-scripts/src/pipeline3/scripts.js @@ -697,7 +697,7 @@ module.exports = { writeProperty(propertyName, value, filename) { var script = ""; - script += `if ! grep -R "^[#]*\s*${propertyName}.*" ${filename} > /dev/null; then\n`; + script += `if ! grep -w "${propertyName}" ${filename} > /dev/null; then\n`; script += `\techo "'${propertyName}' is not found in file '${filename}'. Appending..."\n`; script += `\techo "${propertyName}=${value}" >> ${filename}\n`; script += "else\n";