visionmedia-release 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.rdoc +9 -0
  2. data/Todo.rdoc +0 -2
  3. data/bin/re +16 -3
  4. data/release.gemspec +2 -2
  5. metadata +2 -2
data/History.rdoc CHANGED
@@ -1,4 +1,13 @@
1
1
 
2
+ === 0.2.3 / 2009-03-10
3
+
4
+ * Added better git logging support. Now stores .re/last_version and compares log changes
5
+ since then and HEAD.
6
+
7
+ === 0.2.2 / 2009-03-09
8
+
9
+ * Added raising of error when version file is not found
10
+
2
11
  === 0.2.1 / 2009-03-09
3
12
 
4
13
  * Fixed history when using --dry-run, no longer attempts to add git log to the change log
data/Todo.rdoc CHANGED
@@ -1,10 +1,8 @@
1
1
 
2
2
  == Major:
3
3
 
4
- * Add .re-log file with release SHAs
5
4
  * Add ability to do a graceful abort
6
5
  * Add option to prevent -a in commit command
7
- * Get git log working better
8
6
  * Better specs
9
7
  * When exception is raised revert all alterations made to that point
10
8
  * Refactor
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.2.1'
8
+ program :version, '0.2.3'
9
9
  program :description, 'Github release management'
10
10
 
11
11
  CONFIG_FILE = File.expand_path('~/.re-config')
@@ -19,6 +19,7 @@ def sh command, nullify = true
19
19
  end
20
20
 
21
21
  def extract_version_from file
22
+ raise 'faild to locate version file. Use --file' unless file
22
23
  contents = File.read file
23
24
  version = $~.captures if contents =~ /(\d+)\.(\d+)\.(\d+)/
24
25
  raise "failed to locate version within #{file}. Must be format 'n.n.n'." unless version.length == 3
@@ -104,6 +105,18 @@ def actions
104
105
  @__actions
105
106
  end
106
107
 
108
+ def save_last_version
109
+ `mkdir .re` unless File.directory? '.re'
110
+ File.open('.re/last_version', 'w+') do |file|
111
+ file.write `git tag`.split.last
112
+ end
113
+ end
114
+
115
+ def last_version
116
+ save_last_version
117
+ File.read '.re/last_version'
118
+ end
119
+
107
120
  command :bump do |c|
108
121
  bump_options c
109
122
  c.syntax = 're bump [level] [options]'
@@ -138,10 +151,10 @@ command :bump do |c|
138
151
  else
139
152
  version = replace_version o.file, level
140
153
  end
141
-
154
+
142
155
  if o.history
143
156
  banner = "\n=== #{version} / #{ Time.now.strftime('%Y-%m-%d') }\n"
144
- changes = sh "git log --pretty=#{o.format} -#{o.commits}", false
157
+ changes = sh "git log --pretty=#{o.format} #{last_version}..", false
145
158
  unless o.dry_run
146
159
  previous = File.read locate_history_file
147
160
  File.open(locate_history_file, 'w') do |file|
data/release.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{release}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.3"
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"]
9
- s.date = %q{2009-03-09}
9
+ s.date = %q{2009-03-10}
10
10
  s.default_executable = %q{re}
11
11
  s.description = %q{Github release management system}
12
12
  s.email = %q{tj@vision-media.ca}
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.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-09 00:00:00 -07:00
12
+ date: 2009-03-10 00:00:00 -07:00
13
13
  default_executable: re
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency