visionmedia-release 0.3.2 → 0.3.5
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 +14 -0
- data/Manifest +0 -1
- data/Rakefile +2 -2
- data/Todo.rdoc +0 -1
- data/bin/re +32 -41
- data/release.gemspec +6 -6
- metadata +4 -4
data/History.rdoc
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
|
2
|
+
=== 0.3.5 / 2009-04-08
|
3
|
+
|
4
|
+
* Added support for multiple version files
|
5
|
+
|
6
|
+
=== 0.3.4 / 2009-03-24
|
7
|
+
|
8
|
+
* Github build me?
|
9
|
+
|
10
|
+
=== 0.3.3 / 2009-03-24
|
11
|
+
|
12
|
+
* Updated compatibility with latest commander
|
13
|
+
* Removed need for .re directory
|
14
|
+
* Fixed config help doc typo
|
15
|
+
|
2
16
|
=== 0.3.2 / 2009-03-14
|
3
17
|
|
4
18
|
* Github, build me!
|
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -4,13 +4,13 @@ require 'rake'
|
|
4
4
|
require 'echoe'
|
5
5
|
load './bin/re'
|
6
6
|
|
7
|
-
Echoe.new
|
7
|
+
Echoe.new "release", program(:version) do |p|
|
8
8
|
p.author = "TJ Holowaychuk"
|
9
9
|
p.email = "tj@vision-media.ca"
|
10
10
|
p.summary = "Github release management system"
|
11
11
|
p.url = "http://github.com/visionmedia/release"
|
12
12
|
p.runtime_dependencies = []
|
13
|
-
p.runtime_dependencies << "visionmedia-commander >=3.1.
|
13
|
+
p.runtime_dependencies << "visionmedia-commander >=3.1.7"
|
14
14
|
end
|
15
15
|
|
16
16
|
Dir['tasks/**/*.rake'].sort.each { |f| load f }
|
data/Todo.rdoc
CHANGED
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.3.
|
8
|
+
program :version, '0.3.5'
|
9
9
|
program :description, 'Github release management'
|
10
10
|
|
11
11
|
default_command :bump
|
@@ -21,7 +21,7 @@ def sh command, nullify = true
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def extract_version_from file
|
24
|
-
raise '
|
24
|
+
raise 'failed to locate version file. Use --file' unless file
|
25
25
|
contents = File.read file
|
26
26
|
version = $~.captures if contents =~ /(\d+)\.(\d+)\.(\d+)/
|
27
27
|
raise "failed to locate version within #{file}. Must be format 'n.n.n'." unless version.length == 3
|
@@ -56,7 +56,7 @@ def locate_history_file
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def bump_options c
|
59
|
-
c.option '-f', '--file FILE', 'File containing the version, otherwise searches lib/ for version.rb'
|
59
|
+
c.option '-f', '--file FILE', Array, 'File(s) containing the version, otherwise searches lib/ for version.rb'
|
60
60
|
c.option '-m', '--message MESSAGE', String, 'Message defaults to \'- Release VERSION\''
|
61
61
|
c.option '-r', '--rake TASKS', Array, 'Defaults to manifest,gemspec to build manifest / gemspec before releasing'
|
62
62
|
c.option '-R', '--no-rake', 'Disable all rake tasks'
|
@@ -67,27 +67,22 @@ def bump_options c
|
|
67
67
|
c.option '-M', '--verify-master', 'Verify that master is the current branch before releasing'
|
68
68
|
end
|
69
69
|
|
70
|
-
def save_config
|
71
|
-
File.open(CONFIG_FILE, 'w+') { |f| YAML.dump
|
70
|
+
def save_config hash
|
71
|
+
File.open(CONFIG_FILE, 'w+') { |f| YAML.dump hash, f }
|
72
72
|
end
|
73
73
|
|
74
74
|
def remove_config name
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
if hash = load_config
|
76
|
+
hash.delete name
|
77
|
+
save_config hash
|
78
|
+
end
|
78
79
|
end
|
79
80
|
|
80
81
|
def load_config name = nil
|
81
|
-
|
82
|
-
return
|
83
|
-
raise "configuration '#{name}' cannot be found" unless
|
84
|
-
|
85
|
-
end
|
86
|
-
|
87
|
-
def merge_options options, other_options
|
88
|
-
a = options.instance_variable_get :"@table"
|
89
|
-
b = other_options.instance_variable_get :"@table"
|
90
|
-
a.merge! b
|
82
|
+
hash = YAML.load_file CONFIG_FILE rescue false
|
83
|
+
return hash unless name and hash
|
84
|
+
raise "configuration '#{name}' cannot be found" unless hash.include? name
|
85
|
+
hash[name]
|
91
86
|
end
|
92
87
|
|
93
88
|
def master_branch?
|
@@ -106,16 +101,8 @@ def actions
|
|
106
101
|
@__actions
|
107
102
|
end
|
108
103
|
|
109
|
-
def save_last_version
|
110
|
-
`mkdir .re` unless File.directory? '.re'
|
111
|
-
File.open('.re/last_version', 'w+') do |file|
|
112
|
-
file.write `git tag`.split.last
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
104
|
def last_version
|
117
|
-
|
118
|
-
File.read '.re/last_version'
|
105
|
+
`git tag`.split.last
|
119
106
|
end
|
120
107
|
|
121
108
|
command :bump do |c|
|
@@ -132,10 +119,9 @@ command :bump do |c|
|
|
132
119
|
level = args.shift || 'patch'
|
133
120
|
o.message = o.message || 'Release VERSION'
|
134
121
|
o.rake = o.rake || %w( manifest gemspec )
|
135
|
-
o.file = o.file || locate_version_file
|
122
|
+
o.file = o.file || [locate_version_file]
|
136
123
|
o.format = o.format || "format:'* %s'"
|
137
|
-
|
138
|
-
merge_options o, load_config(o.config) if o.config
|
124
|
+
o.__hash__.merge! load_config(o.config)
|
139
125
|
|
140
126
|
if o.verify_master
|
141
127
|
action 'verifying master branch' do
|
@@ -147,9 +133,14 @@ command :bump do |c|
|
|
147
133
|
def sh command, nullify = true
|
148
134
|
log "`#{command}`"
|
149
135
|
end
|
150
|
-
version
|
136
|
+
log "version file(s) #{o.file.join(', ')}"
|
137
|
+
version = o.file.inject false do |version, file|
|
138
|
+
version = bump_version(file, level).join '.'
|
139
|
+
end
|
151
140
|
else
|
152
|
-
version =
|
141
|
+
version = o.file.inject false do |version, file|
|
142
|
+
version = replace_version file, level
|
143
|
+
end
|
153
144
|
end
|
154
145
|
|
155
146
|
if o.history
|
@@ -217,32 +208,32 @@ command :config do |c|
|
|
217
208
|
're config add myproject --message "Release myproject VERSION" --file bin/myproject'
|
218
209
|
c.example 'Use the config created above', 're bump --config myproject'
|
219
210
|
c.example 'Remove myproject config', 're config remove myproject'
|
220
|
-
c.example 'Show all configurations', 're show'
|
211
|
+
c.example 'Show all configurations', 're config show'
|
221
212
|
c.when_called do |args, options|
|
222
213
|
op = args.shift
|
223
214
|
name = args.shift
|
224
215
|
|
225
216
|
case op
|
226
217
|
when 'add'
|
227
|
-
|
228
|
-
if
|
229
|
-
config =
|
230
|
-
config[name] = options
|
218
|
+
abort 'invalid configuration name' unless name
|
219
|
+
if config = load_config
|
220
|
+
config[name] = options.__hash__
|
231
221
|
else
|
232
|
-
config = { name => options }
|
222
|
+
config = { name => options.__hash__ }
|
233
223
|
end
|
234
224
|
save_config config
|
235
225
|
log "configuration '#{name}' saved"
|
236
226
|
when 'remove'
|
237
|
-
|
227
|
+
abort 'invalid configuration name' unless name
|
238
228
|
remove_config name
|
239
229
|
log "configuration '#{name}' removed"
|
240
230
|
when 'show'
|
231
|
+
abort 'no configurations' unless load_config
|
241
232
|
load_config.each do |name, config|
|
242
|
-
say '%14s: %s' % [name, config.inspect
|
233
|
+
say '%14s: %s' % [name, config.inspect]
|
243
234
|
end
|
244
235
|
else
|
245
|
-
|
236
|
+
abort 'invalid operation'
|
246
237
|
end
|
247
238
|
|
248
239
|
end
|
data/release.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{release}
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.5"
|
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-
|
9
|
+
s.date = %q{2009-04-08}
|
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}
|
13
13
|
s.executables = ["re"]
|
14
14
|
s.extra_rdoc_files = ["bin/re", "README.rdoc", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake", "tasks/update.rake"]
|
15
|
-
s.files = ["bin/re", "History.rdoc", "Manifest", "Rakefile", "README.rdoc", "
|
15
|
+
s.files = ["bin/re", "History.rdoc", "Manifest", "Rakefile", "README.rdoc", "spec/fixtures/bar/version.rb", "spec/fixtures/foo.rb", "spec/release_spec.rb", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake", "tasks/update.rake", "Todo.rdoc", "release.gemspec"]
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.homepage = %q{http://github.com/visionmedia/release}
|
18
18
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Release", "--main", "README.rdoc"]
|
@@ -26,11 +26,11 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.specification_version = 2
|
27
27
|
|
28
28
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
29
|
-
s.add_runtime_dependency(%q<visionmedia-commander>, [">= 3.1.
|
29
|
+
s.add_runtime_dependency(%q<visionmedia-commander>, [">= 3.1.7"])
|
30
30
|
else
|
31
|
-
s.add_dependency(%q<visionmedia-commander>, [">= 3.1.
|
31
|
+
s.add_dependency(%q<visionmedia-commander>, [">= 3.1.7"])
|
32
32
|
end
|
33
33
|
else
|
34
|
-
s.add_dependency(%q<visionmedia-commander>, [">= 3.1.
|
34
|
+
s.add_dependency(%q<visionmedia-commander>, [">= 3.1.7"])
|
35
35
|
end
|
36
36
|
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.3.
|
4
|
+
version: 0.3.5
|
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-
|
12
|
+
date: 2009-04-08 00:00:00 -07:00
|
13
13
|
default_executable: re
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 3.1.
|
23
|
+
version: 3.1.7
|
24
24
|
version:
|
25
25
|
description: Github release management system
|
26
26
|
email: tj@vision-media.ca
|
@@ -41,7 +41,6 @@ files:
|
|
41
41
|
- Manifest
|
42
42
|
- Rakefile
|
43
43
|
- README.rdoc
|
44
|
-
- release.gemspec
|
45
44
|
- spec/fixtures/bar/version.rb
|
46
45
|
- spec/fixtures/foo.rb
|
47
46
|
- spec/release_spec.rb
|
@@ -51,6 +50,7 @@ files:
|
|
51
50
|
- tasks/spec.rake
|
52
51
|
- tasks/update.rake
|
53
52
|
- Todo.rdoc
|
53
|
+
- release.gemspec
|
54
54
|
has_rdoc: true
|
55
55
|
homepage: http://github.com/visionmedia/release
|
56
56
|
post_install_message:
|