Sha256: 1e1a224c9173d46d1e08e2d184d0cfc104a01cc06eb9fd5fba23467d41821e46
Contents?: true
Size: 912 Bytes
Versions: 8
Compression:
Stored size: 912 Bytes
Contents
$:.push File.expand_path('../lib', __FILE__) require 'thor' require 'thor-scmversion' class ThorSCMVersion < Thor namespace 'scmver' desc "build", "Build the gem" def build system("gem build -V 'thor-scmversion.gemspec'") FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'pkg')) FileUtils.mv("thor-scmversion-#{current_version}.gem", 'pkg') end desc "install", "Build and install latest to system gems" def install invoke "build", [] system("gem install pkg/thor-scmversion-#{current_version}.gem") end desc "release [TYPE]", "Bump version, make a build, and push to Rubygems" def release(type='auto') @current_version = nil invoke "version:bump", [type] invoke "build", [] system("gem push pkg/thor-scmversion-#{current_version}.gem") end private def current_version @current_version ||= ::ThorSCMVersion.versioner.from_path end end
Version data entries
8 entries across 8 versions & 1 rubygems