Sha256: a6f78ab30859017ffdfe387e241d44e6a614432c02cc273b4b48b499a8c53a2c
Contents?: true
Size: 688 Bytes
Versions: 6
Compression:
Stored size: 688 Bytes
Contents
require "bundler" Bundler::GemHelper.install_tasks task :default do sh "rspec spec/" end rule /^version:bump:.*/ do |t| sh "git status | grep 'nothing to commit'" # ensure we are not dirty index = ['major', 'minor','patch'].index(t.name.split(':').last) file = 'lib/youtube_search/version.rb' version_file = File.read(file) old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a version_parts[index] = version_parts[index].to_i + 1 new_version = version_parts * '.' File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) } sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'" end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
youtube_search-0.1.5 | Rakefile |
youtube_search-0.1.4 | Rakefile |
youtube_search-0.1.3 | Rakefile |
youtube_search-0.1.2 | Rakefile |
youtube_search-0.1.1 | Rakefile |
youtube_search-0.1.0 | Rakefile |