Sha256: b3f81ad89800b67114e0482ed68c58da8b54aff29a68c5b0d5273fa5969ee1c4
Contents?: true
Size: 747 Bytes
Versions: 42
Compression:
Stored size: 747 Bytes
Contents
require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'semantic' RSpec::Core::RakeTask.new(:spec) task default: :spec namespace :version do desc "Bumps the minor version of the gem, saving to the version file" task :bump do version = Semantic::Version.new(Determinator::VERSION) # Always bump the patch version, the minor and major versions can be bumped manually version.patch += 1 version_file = File.join(__dir__, "lib/determinator/version.rb") vfile_contents = File.read(version_file) new_contents = vfile_contents.sub(%r{VERSION = "(.+?)"}, %Q[VERSION = "#{version.to_s}"]) File.write(version_file, new_contents) Determinator.send(:remove_const, :VERSION) load version_file end end
Version data entries
42 entries across 42 versions & 1 rubygems