visionmedia-release 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.rdoc +5 -0
- data/Manifest +1 -0
- data/bin/re +15 -4
- data/release.gemspec +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
data/Manifest
CHANGED
data/bin/re
CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
|
|
4
4
|
require 'commander'
|
5
5
|
|
6
6
|
program :name, 'release'
|
7
|
-
program :version, '0.0.
|
7
|
+
program :version, '0.0.3'
|
8
8
|
program :description, 'Github release management'
|
9
9
|
|
10
10
|
def sh command
|
@@ -49,7 +49,8 @@ command :bump do |c|
|
|
49
49
|
c.option '-f', '--file FILE', 'File containing the version, otherwise searches lib/ for version.rb'
|
50
50
|
c.option '-m', '--message MESSAGE', String, 'Message defaults to \'- Release VERSION\''
|
51
51
|
c.option '-r', '--rake TASKS', Array, 'Defaults to manifest,gemspec to build manifest / gemspec before releasing'
|
52
|
-
c.option '-R', '--no-rake', 'Disable rake tasks'
|
52
|
+
c.option '-R', '--no-rake', 'Disable all rake tasks'
|
53
|
+
c.option '-d', '--dry-run', 'Performs a dry run, without releasing'
|
53
54
|
c.when_called do |args, o|
|
54
55
|
# Defaults
|
55
56
|
level = args.shift || 'patch'
|
@@ -57,10 +58,20 @@ command :bump do |c|
|
|
57
58
|
o.file = o.file || locate_version_file
|
58
59
|
o.message = o.message || '- Release VERSION'
|
59
60
|
|
61
|
+
# Dry-run
|
62
|
+
if o.dry_run
|
63
|
+
puts "... performing dry-run"
|
64
|
+
def sh command
|
65
|
+
say "... `#{command}`"
|
66
|
+
end
|
67
|
+
version = bump_version(o.file, level).join '.'
|
68
|
+
else
|
69
|
+
version = replace_version o.file, level
|
70
|
+
end
|
71
|
+
|
60
72
|
# Release
|
61
73
|
say "... bumping #{level} level in #{o.file}"
|
62
|
-
|
63
|
-
o.rake.each { |task| sh "rake #{task}" } if o.no_rake
|
74
|
+
o.rake.each { |task| sh "rake #{task}" } unless o.no_rake == false
|
64
75
|
sh "git commit -a -m '#{ o.message.sub('VERSION', version) }'"
|
65
76
|
sh "git tag #{version} && git push && git push --tags"
|
66
77
|
say "... release #{version} complete"
|
data/release.gemspec
CHANGED