Created
September 24, 2012 15:49
-
-
Save mlafeldt/3776641 to your computer and use it in GitHub Desktop.
Ruby one-liner to increment the (patch) version of a Chef cookbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -pe '$_.to_s.sub!(/^(version.+)(\d+)/) { "#{$1}#{$2.to_i + 1}" }' -i metadata.rb | |
git commit -m "Version bump by Jenkins" metadata.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment