Sha256: 55a55a1502696c7790b757a0d83b8c84bc424dbdeeab84fce68e426b7143b932
Contents?: true
Size: 738 Bytes
Versions: 5
Compression:
Stored size: 738 Bytes
Contents
namespace :package do desc "Update the version in #{@version_file} to current and commit." task :versionbump do old_version = get_version_file_version contents = IO.read(@version_file) new_version = '"' + @version.to_s.strip + '"' if contents.match("VERSION = #{old_version}") contents.gsub!("VERSION = #{old_version}", "VERSION = #{new_version}") elsif contents.match("#{@name.upcase}VERSION = #{old_version}") contents.gsub!("#{@name.upcase}VERSION = #{old_version}", "#{@name.upcase}VERSION = #{new_version}") else contents.gsub!(old_version, @version) end file = File.open(@version_file, 'w') file.write contents file.close git_commit_file(@version_file) end end
Version data entries
5 entries across 5 versions & 2 rubygems