title: Ruby iterate version number
body: <p>I'm building a pipeline to deploy a gem to Rubygems. The general consensus is that it will read a change in the github library and iterate the minor in the version. I'm struggling to come up with an idea of how to do this, as it stands, a makefile will be used to execute something that iterates the <code>version.rb</code> file:</p>
  
  <p>eg: <code>make deploy update=minor</code> </p>
  
  <p>or something of sort, but i'm not sure on how to go about iterating the file in a 'ruby'y way rather than trying to amend it as if it's just another text file. </p>
  
  <p>The current version file looks like: </p>
  
  <pre><code>module Pugin
    release_no = 0
    patch_no = 1
    hotfix_no = 0
    VERSION = release_no.to_s + "." + patch_no.to_s + "." + hotfix_no.to_s
  end
  </code></pre>