title: Using Jenkins BUILD NUMBER in RPM spec file
body: <pre><code>Name:                   My Software
  Version:                1.0.5
  Release:                1
  Summary:                This is my software
  </code></pre>
  
  <p>Not sure if anyone has tried this before or if it is easy, but:</p>
  
  <p>A spec file has two unique indicators for its version:</p>
  
  <ul>
  <li>Version (which specifies software version)</li>
  <li>Release (which specifies the package's number - if you build an RPM, it's broken, and build another one, you up the 'Release' number.</li>
  </ul>
  
  <p>I'm wondering if anyone has tried, or knows how, I could use the Jenkins $BUILD_NUMBER variable to dynamically change the <code>Release</code> number, thereby increasing the <code>Release</code> number every time a new successful build completes...?</p>