Sha256: e8c13ac1df2c3bf1babd4bb37cf11fb7aa9f793847ea02d580ab64dc1e0ed465
Contents?: true
Size: 1.47 KB
Versions: 5
Compression:
Stored size: 1.47 KB
Contents
module Semmy module Tasks class Versioning < Base def define namespace 'versioning' do task 'remove_development_version_suffix' do new_version = VersionString .remove_suffix(Project.version, config.development_version_suffix) Shell.info("Removing #{config.development_version_suffix} suffix " \ 'from version.') rewrite_gemspec_version(new_version) end task 'bump_major' do new_version = VersionString .bump_major(Project.version, config.development_version_suffix) Shell.info("Bumping version to #{new_version}.") rewrite_gemspec_version(new_version) end task 'bump_minor' do new_version = VersionString .bump_minor(Project.version, config.development_version_suffix) Shell.info("Bumping version to #{new_version}.") rewrite_gemspec_version(new_version) end task 'bump_patch_level' do new_version = VersionString .bump_patch_level(Project.version) Shell.info("Bumping version to #{new_version}.") rewrite_gemspec_version(new_version) end end end private def rewrite_gemspec_version(new_version) Files.rewrite(VersionFile.find(Gemspec.gem_name), VersionFile::Update.new(new_version)) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems