visionmedia-release 0.1.3 → 0.1.4
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 +7 -0
- data/bin/re +8 -11
- data/release.gemspec +1 -1
- metadata +1 -1
data/History.rdoc
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
|
2
|
+
=== 0.1.4 / 2009-03-06
|
3
|
+
|
4
|
+
* Added -F, --format switch for chaning the git log --pretty format
|
5
|
+
* Changed back to #system in #sh
|
6
|
+
* Changed log format to "* %s" since most people use the RDoc syntax for history
|
7
|
+
* Fixed issue with --config not merging
|
8
|
+
|
2
9
|
=== 0.1.3 / 2009-03-06
|
3
10
|
|
4
11
|
* Added progress-bar
|
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.
|
8
|
+
program :version, '0.1.4'
|
9
9
|
program :description, 'Github release management'
|
10
10
|
|
11
11
|
CONFIG_FILE = File.expand_path('~/.re-config')
|
@@ -15,11 +15,10 @@ trap 'INT' do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def sh command
|
18
|
-
|
18
|
+
system command
|
19
19
|
end
|
20
20
|
|
21
21
|
def extract_version_from file
|
22
|
-
raise "version cannot find version file #{file}" unless file
|
23
22
|
contents = File.read file
|
24
23
|
version = $~.captures if contents =~ /(\d+)\.(\d+)\.(\d+)/
|
25
24
|
raise "failed to locate version within #{file}. Must be format 'n.n.n'." unless version.length == 3
|
@@ -62,6 +61,7 @@ def bump_options c
|
|
62
61
|
c.option '-n', '--commits NUMBER', Integer, 'Number of commits to display when using --history'
|
63
62
|
c.option '-d', '--dry-run', 'Performs a dry run, without releasing'
|
64
63
|
c.option '-t', '--trace', 'Output callstack when an exception is raised'
|
64
|
+
c.option '-F', '--format FORMAT', 'Valid git log --pretty format. Defaults to \'%s\''
|
65
65
|
c.option '-M', '--verify-master', 'Verify that master is the current branch before releasing'
|
66
66
|
end
|
67
67
|
|
@@ -119,20 +119,17 @@ command :bump do |c|
|
|
119
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
|
+
o.format = o.format || "format:'* %s'"
|
122
123
|
o.commits = o.commits || 20
|
123
|
-
|
124
|
+
|
125
|
+
merge_options o, load_config(o.config) if o.config
|
126
|
+
|
124
127
|
if o.verify_master
|
125
128
|
action 'verifying master branch' do
|
126
129
|
raise 'master branch verification failed' unless master_branch?
|
127
130
|
end
|
128
131
|
end
|
129
132
|
|
130
|
-
if o.config
|
131
|
-
action "loading #{o.config} configuration" do
|
132
|
-
merge_options o, load_config(o.config)
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
133
|
if o.dry_run
|
137
134
|
def sh command
|
138
135
|
log "`#{command}`"
|
@@ -143,7 +140,7 @@ command :bump do |c|
|
|
143
140
|
end
|
144
141
|
|
145
142
|
if o.history
|
146
|
-
sh "git log --pretty
|
143
|
+
sh "git log --pretty=#{o.format} -#{o.commits} | $EDITOR"
|
147
144
|
sh "$EDITOR #{locate_history_file} --wait"
|
148
145
|
end
|
149
146
|
|
data/release.gemspec
CHANGED