title: Automate semver in ConcourseCI
body: <p>I have a ConcourseCI pipeline that automatically increments my version number using this resource type: <a href="https://github.com/concourse/semver-resource" rel="nofollow noreferrer">https://github.com/concourse/semver-resource</a></p>
  
  <p>My resource declaration looks like this:</p>
  
  <pre><code>  - name: version
      type: semver
      source:
        driver: git
        initial_version: 0.0.1
        uri: {{version-repo-uri}}
        branch: {{version-repo-branch}}
        file: {{version-file}}
        private_key: {{git-key}}
  </code></pre>
  
  <p>And my job looks like this:</p>
  
  <pre><code>- name: increment-version
      plan:
        - get: {{git-repo-name}}
          trigger: true
        - get: version
          params: {bump: patch}
        - put: version
          params: {file: version/version}
  </code></pre>
  
  <p>So as you can see, right now I'm always bumping PATCH version. However, I'd like an easy and preferably automated way for the pipeline to increment MAJOR, MINOR, PATCH, or RC version depending on the circumstances.</p>
  
  <p>Is there a git hook or something similar that will know when to bump what? Any implementation best practices when automating semver into a pipeline? Any other Concourse resource-type I should be using instead? Or is this something we should definitely leave for a human to decide? And in that case, how to easily integrate that "manual" step into a CD pipeline?</p>
  
  <p>The closest thing I can think of is having a version file in my project (committed to github) with the intended version, which will set MAJOR, MINOR, PATCH numbers. The pipeline picks ups that file, uses it as a base somehow, and only increments RC numbers, but this feels incredibly error prone.</p>
  
  <p>To be clear, I'm not asking how to version releases in theory, and the meanings of what major, minor, or patch are. I'm asking in practice how to implement those recommendations listed on <a href="https://semver.org/" rel="nofollow noreferrer">https://semver.org/</a>.</p>