sh "find packages -name internal-* -type d -exec bash -c 'for arg; do export VERSION=\$(grep \${arg##*/} nexus-cicd-versions.txt | cut -d: -f2);sed -i \'s/#VERSION#/${env.VERSION}/g\' \$arg/0/package.json; done' _ {} +"
sh "find packages -name internal-* -type d -exec bash -c 'for arg; do export VERSION=\$(grep \${arg##*/} nexus-cicd-versions.txt | cut -d: -f2);sed -i \'s/#VERSION#/\${VERSION}/g\' \$arg/0/package.json; done' _ {} +"
GString might be a bit crazy to escape some chars, maybe it's worthy to create a sh file somewhere and just call it? Then you get the benefits of being able to call/use it without the need to be in the pipeline itself.My two cents
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/3F2ozjnSiTE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/af107496-9a0e-4dbf-89d7-32e60bc192f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.