Write to file with Jenkins and Groovy
<p>When running my Jenkins build i need to update the contents of a file with a version number in this case. I have come across a plugin called <code>text-file-operations</code> but rather than write a whole new file I thought it would be better to update.</p>

<p>In this example I have a podspec file located in the root of the project which just needs a version number updated with a variable I have created earlier in the process.</p>

<pre><code>spec.version               = '13.4.0'
</code></pre>

<p>I just need to convert that to</p>

<pre><code>spec.version               = "${VERSION_NUMBER}"
</code></pre>

<p>Is there a way to do this ?</p>