visionmedia-release 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ === 0.1.8 / 2009-03-06
3
+
4
+ * Added auto-generation / saving of history
5
+ * Refactored locate_version_file
6
+ * Seperated actions
7
+ * Removed hyphen from default commit message
8
+
2
9
  === 0.1.7 / 2009-03-06
3
10
 
4
11
  * Changed #sh (again), /dev/null-ifying stdout
@@ -65,4 +72,4 @@
65
72
 
66
73
  === 0.0.1 / 2009-03-05
67
74
 
68
- * Initial release
75
+ * Initial release
data/README.rdoc CHANGED
@@ -33,6 +33,9 @@ View help for the bump sub-command
33
33
  Bump patch (tiny), auto-locates version.rb
34
34
  $ re bump
35
35
 
36
+ It is recommended that you do a dry-run to verify that release will work
37
+ $ re bump --dry-run
38
+
36
39
  Bump major with custom commit message (VERSION is replaced with release version)
37
40
  $ re bump major -m 'Release VERSION, check it out!'
38
41
 
@@ -42,14 +45,16 @@ Run rake tasks before releasing (defaults to manifest,gemspec)
42
45
  Specific version file
43
46
  $ re bump --file bin/re
44
47
 
45
- Edit changelog or history (auto-locates file within the current directory) before releasing
48
+ Edit changelog or history (auto-locates file within the current directory) before releasing.
49
+ This switch currently grabs the last -n commits from git log and places them in your history
50
+ file, which then opens for adjustments. Alter -n, --commits to change the number of commits added.
46
51
  $ re bump major --history
47
52
 
48
53
  == Limitations
49
54
 
50
55
  * Currently supports 'n.n.n' format only
51
56
  * The --history switch has been tested with textmate only
52
- * Auto-locates version.rb (specify a specific file with --file switch)
57
+ * Auto-locates version.rb using glob lib/**/version.rb (specify a specific file with --file switch)
53
58
 
54
59
  == License:
55
60
 
data/Todo.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  == Major:
3
3
 
4
- * Add .re-log file with commit SHAs
4
+ * Add .re-log file with release SHAs
5
5
  * Add ability to do a graceful abort
6
6
  * Add option to prevent -a in commit command
7
7
  * Get git log working better
data/bin/re CHANGED
@@ -5,7 +5,7 @@ require 'commander'
5
5
  require 'yaml'
6
6
 
7
7
  program :name, 'release'
8
- program :version, '0.1.7'
8
+ program :version, '0.1.8'
9
9
  program :description, 'Github release management'
10
10
 
11
11
  CONFIG_FILE = File.expand_path('~/.re-config')
@@ -45,7 +45,7 @@ def replace_version file, level
45
45
  end
46
46
 
47
47
  def locate_version_file
48
- Dir['lib/*/**/*.rb'].grep(/version/).first
48
+ Dir['lib/**/version.rb'].first
49
49
  end
50
50
 
51
51
  def locate_history_file
@@ -116,7 +116,7 @@ command :bump do |c|
116
116
  begin
117
117
 
118
118
  level = args.shift || 'patch'
119
- o.message = o.message || '- Release VERSION'
119
+ o.message = o.message || 'Release VERSION'
120
120
  o.rake = o.rake || %w( manifest gemspec )
121
121
  o.file = o.file || locate_version_file
122
122
  o.format = o.format || "format:'* %s'"
@@ -140,7 +140,12 @@ command :bump do |c|
140
140
  end
141
141
 
142
142
  if o.history
143
- sh "git log --pretty=#{o.format} -#{o.commits} | $EDITOR"
143
+ banner = "\n=== #{version} / #{ Time.now.strftime('%Y-%m-%d') }\n"
144
+ changes = sh "git log --pretty=#{o.format} -#{o.commits}", false
145
+ previous = File.read locate_history_file
146
+ File.open(locate_history_file, 'w') do |file|
147
+ file.write [banner, changes, previous].join("\n")
148
+ end
144
149
  sh "$EDITOR #{locate_history_file} --wait"
145
150
  end
146
151
 
@@ -154,14 +159,22 @@ command :bump do |c|
154
159
  sh "git commit -a -m '#{ o.message.sub('VERSION', version) }'"
155
160
  end
156
161
 
157
- action 'tag / push' do
158
- sh "git tag #{version} && git push && git push --tags"
162
+ action 'tagging' do
163
+ sh "git tag #{version}"
159
164
  end
160
-
165
+
166
+ action 'pushing branch' do
167
+ sh "git push"
168
+ end
169
+
170
+ action 'pushing tags' do
171
+ sh "git push --tags"
172
+ end
173
+
161
174
  unless o.dry_run
162
175
  options = {
163
176
  :complete_message => "Release #{version} complete",
164
- :format => '(:progress_bar) :title ',
177
+ :format => "Releasing #{version} (:progress_bar) :title ",
165
178
  :width => actions.length * 4,
166
179
  }
167
180
  progress actions, options do |title, proc|
data/release.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{release}
5
- s.version = "0.1.7"
5
+ s.version = "0.1.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bar
3
3
  def version
4
- '30.0.0'
4
+ '31.0.0'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visionmedia-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk