Sha256: 08d9d7bc6fbf27c1edd4c0a39a7c77584bcca1b0d5bf3f22cf61a89733aedc4c
Contents?: true
Size: 935 Bytes
Versions: 5
Compression:
Stored size: 935 Bytes
Contents
module VersionInfo module ThorTasks def self.install(opts = {}) Class.new(::Thor) do @target = opts[:class] class << self attr_reader :target end namespace :vinfo desc 'show', "Show version tag and create version_info.yml if missing" def show puts target::VERSION.tag target::VERSION.save unless File.exist?(target::VERSION.file_name) end desc "inspect", "Show complete version info" def inspect puts target::VERSION.inspect end desc "bump SEGMENT=patch", "bumps segment: [#{VersionInfo.segments.join(', ')}]" def bump(sgm = :patch) target::VERSION.bump(sgm) puts "version changed to #{target::VERSION}" target::VERSION.save end protected def target self.class.target end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems