Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 248 lines (208 sloc) 6.486 kB
eb2ddf2 @ivey setup merb-more Rakefile getting ready for 0.9 release
ivey authored
1 ## THESE ARE CRUCIAL
2838667 @hassox Updates the versions to a new file
hassox authored
2 require File.join(File.dirname(__FILE__), "merb-core/lib/merb-core/version.rb")
3
bae353b @ivey add clean task
ivey authored
4 require "rake/clean"
eb2ddf2 @ivey setup merb-more Rakefile getting ready for 0.9 release
ivey authored
5 require "rake/gempackagetask"
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
6 require File.join(File.dirname(__FILE__), 'merb-core/lib/merb-core/tasks/merb_rake_helper')
eb2ddf2 @ivey setup merb-more Rakefile getting ready for 0.9 release
ivey authored
7 require 'fileutils'
8 include FileUtils
9
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
10 merb_more_gem_paths = %w[
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
11 merb-action-args
12 merb-assets
f07ef79 @wycats 1.0 almost ready
wycats authored
13 merb-slices
8586b00 @fabien Add merb-auth back in the -more gems
fabien authored
14 merb-auth
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
15 merb-cache
16 merb-exceptions
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
17 merb-gen
18 merb-haml
19 merb-helpers
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
20 merb-mailer
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
21 merb-param-protection
29bdb02 @ivey create merb-more.rb
ivey authored
22 ]
c80ef96 don't require 'merb' in the main rakefile
Ezra Zygmuntowicz authored
23
cdb515f @wycats Update release task to be relatively useful
wycats authored
24 merb_release = {
25 "merb-auth" =>
26 [
27 "merb-auth",
28 "merb-auth-core",
29 "merb-auth-more",
30 "merb-auth-slice-password"
31 ],
32 "merb" =>
33 [
34 "merb-action-args",
35 "merb-assets",
36 "merb-slices",
37 "merb-cache",
38 "merb-core",
39 "merb-exceptions",
40 "merb-gen",
41 "merb-haml",
42 "merb-helpers",
43 "merb-mailer",
44 "merb-param-protection",
45 "merb_datamapper",
2435f86 @wycats Updates merb-gen to supply the merb.thor directory and hack around so…
wycats authored
46 "merb",
dc0df76 @snusnu [merb_datamapper] updated dependencies
snusnu authored
47 "merb-more"
cdb515f @wycats Update release task to be relatively useful
wycats authored
48 ]
49 }
50
8c445b1 @snusnu Install the merb meta-package as the last one
snusnu authored
51 merb_gem_paths = %w[merb-core merb_datamapper] + merb_more_gem_paths + %w[merb]
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
52
53 merb_gems = merb_gem_paths.map { |p| File.basename(p) }
54 merb_more_gems = merb_more_gem_paths.map { |p| File.basename(p) }
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
55
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
56 merb_more_spec = Gem::Specification.new do |s|
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
57 s.rubyforge_project = 'merb-more'
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
58 s.name = "merb-more"
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
59 s.version = Merb::VERSION
ab75de9 @wycats Leftover files
wycats authored
60 s.platform = Gem::Platform::RUBY
6f54e3b @mattetti updated merb-more rakefile
mattetti authored
61 s.author = "Engine Yard"
62 s.email = "merb@engineyard.com"
ab75de9 @wycats Leftover files
wycats authored
63 s.homepage = "http://www.merbivore.com"
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
64 s.summary = "(merb - merb-core) == merb-more. The Full Stack. Take what you need; leave what you don't."
ab75de9 @wycats Leftover files
wycats authored
65 s.description = s.summary
29bdb02 @ivey create merb-more.rb
ivey authored
66 s.files = %w( LICENSE README Rakefile TODO lib/merb-more.rb )
004ae1d @mattetti require rubygems >= 1.3 and add webrat has a dev dependency
mattetti authored
67 s.required_rubygems_version = ">= 1.3.0"
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
68 s.add_dependency "merb-core", ">= #{Merb::VERSION}"
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
69 merb_more_gems.each do |gem|
0bec13c @wycats Fixing up release stuff
wycats authored
70 s.add_dependency gem, "= #{Merb::VERSION}"
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
71 end
72 end
ab75de9 @wycats Leftover files
wycats authored
73
68da4cc @wycats Fix the deletions for once and for all. Fix typo.
wycats authored
74 CLEAN.include ["**/.*.sw?", "pkg", "lib/*.bundle", "*.gem", "doc/rdoc", ".config", "coverage", "cache", "lib/merb-more.rb", "gems/*"]
bae353b @ivey add clean task
ivey authored
75
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
76 Rake::GemPackageTask.new(merb_more_spec) do |package|
77 package.gem_spec = merb_more_spec
78 end
b7e96fc fix up merb-gen to make a good new merb-core 0.9 app
Ezra Zygmuntowicz authored
79
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
80 namespace :install do
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
81
82 desc "Install core gem"
83 task :core => :clean do
84 Merb::RakeHelper.install('merb-core', :version => Merb::VERSION)
85 end
86
87 desc "Install all merb-more gems"
88 task :more => :clean do
89 merb_more_gems.each do |gem|
90 Merb::RakeHelper.install(gem, :version => Merb::VERSION)
91 end
f07ef79 @wycats 1.0 almost ready
wycats authored
92 Merb::RakeHelper.install("merb", :version => Merb::VERSION)
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
93 end
94
95 end
96
97 namespace :uninstall do
98
99 desc "Uninstall core gem"
100 task :core do
101 Merb::RakeHelper.uninstall('merb-core', :version => Merb::VERSION)
102 end
103
104 desc "Uninstall all merb-more gems"
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
105 task :more do
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
106 merb_more_gems.each do |gem|
107 Merb::RakeHelper.uninstall(gem, :version => Merb::VERSION)
108 end
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
109 end
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
110
18a6ed5 @fabien More Rakefile work
fabien authored
111 end
112
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
113 desc "Install all gems"
f07ef79 @wycats 1.0 almost ready
wycats authored
114 task :install do
c07736a @wycats Another tweak to release process
wycats authored
115 merb_gems.each do |gem|
7110160 @wycats Fix rakefile
wycats authored
116 Merb::RakeHelper.install(gem, :version => Merb::VERSION)
f07ef79 @wycats 1.0 almost ready
wycats authored
117 end
118 end
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
119
18a6ed5 @fabien More Rakefile work
fabien authored
120 desc "Uninstall all gems"
aca0d97 @snusnu Fixed rake uninstall to uninstall everything that got rake install'ed
snusnu authored
121 task :uninstall do
122 merb_gems.each do |gem|
123 Merb::RakeHelper.uninstall(gem, :version => Merb::VERSION)
124 end
125 Merb::RakeHelper.uninstall('merb-auth-slice-password', :version => Merb::VERSION)
126 Merb::RakeHelper.uninstall('merb-auth-more', :version => Merb::VERSION)
127 Merb::RakeHelper.uninstall('merb-auth-core', :version => Merb::VERSION)
128 end
522d2ea @ivey merb-more install task for installing all gems
ivey authored
129
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
130 desc "Build the merb-more gems"
eb2ddf2 @ivey setup merb-more Rakefile getting ready for 0.9 release
ivey authored
131 task :build_gems do
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
132 merb_gem_paths.each do |dir|
18a6ed5 @fabien More Rakefile work
fabien authored
133 Dir.chdir(dir) { sh "#{Gem.ruby} -S rake package" }
78af4d0 @ivey merb-more Rakefile now builds merb and merb-more meta gems
ivey authored
134 end
ab75de9 @wycats Leftover files
wycats authored
135 end
136
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
137 desc "Clobber the merb-more sub-gems"
138 task :clobber_gems do
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
139 merb_gem_paths.each do |dir|
18a6ed5 @fabien More Rakefile work
fabien authored
140 Dir.chdir(dir) { sh "#{Gem.ruby} -S rake clobber" }
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
141 end
142 end
143
8b2b7a6 @wycats Modify the rakefiles to be DRY
wycats authored
144 task :package => ["lib/merb-more.rb", :build_gems]
29bdb02 @ivey create merb-more.rb
ivey authored
145 desc "Create merb-more.rb"
faff219 @jackdempsey Update task name to have dependencies handled correctly.
jackdempsey authored
146 task "lib/merb-more.rb" do
29bdb02 @ivey create merb-more.rb
ivey authored
147 mkdir_p "lib"
148 File.open("lib/merb-more.rb","w+") do |file|
f3297f9 @fabien Fixed so-called mysteriously disappearing merb-auth/lib/merb-auth.rb
fabien authored
149 file.puts "### AUTOMATICALLY GENERATED. DO NOT EDIT!"
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
150 merb_more_gems.each do |gem|
29bdb02 @ivey create merb-more.rb
ivey authored
151 next if gem == "merb-gen"
43cb134 @wycats Bump version to 1.0.4
wycats authored
152 file.puts "require \"#{gem}\""
29bdb02 @ivey create merb-more.rb
ivey authored
153 end
154 end
155 end
156
8b2b7a6 @wycats Modify the rakefiles to be DRY
wycats authored
157 task :package do
158 mkdir_p "gems"
159 Dir["**/pkg/*.gem"].each do |file|
160 FileUtils.cp(file, "gems")
161 end
162 end
163
0c3e992 @wycats Add a task to generate the nightlies
wycats authored
164 # This task is only for releasing edge gems on edge.merbivore.com
165
166 task :release_edge => :package do
cb3d67f @wycats cp takes an Array, not a glob
wycats authored
167 FileUtils.cp(Dir["gems/*.gem"], "../gems")
0c3e992 @wycats Add a task to generate the nightlies
wycats authored
168 Dir.chdir("..") do
169 `gem generate_index`
170 end
171 end
172
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
173 RUBY_FORGE_PROJECT = "merb"
174
175 GROUP_NAME = "merb"
176 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
177 PKG_VERSION = Merb::VERSION + PKG_BUILD
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
178
179 RELEASE_NAME = "REL #{PKG_VERSION}"
180
181 namespace :release do
182 desc "Publish Merb More release files to RubyForge."
183 task :merb_more => [ :package ] do
184 require 'rubyforge'
185 require 'rake/contrib/rubyforgepublisher'
186
187 packages = %w( gem tgz zip ).collect{ |ext| "pkg/merb-more-#{PKG_VERSION}.#{ext}" }
188
0fed718 @michaelklishin Update -more release task.
michaelklishin authored
189 begin
190 sh %{rubyforge login}
2a68323 @fabien Rakefile now properly supports install/uninstall (core|more|all)
fabien authored
191 sh %{rubyforge add_release #{RUBY_FORGE_PROJECT} merb-more #{Merb::VERSION} #{packages.join(' ')}}
192 sh %{rubyforge add_file #{RUBY_FORGE_PROJECT} merb-more #{Merb::VERSION} #{packages.join(' ')}}
0fed718 @michaelklishin Update -more release task.
michaelklishin authored
193 rescue Exception => e
194 puts
195 puts "Release failed: #{e.message}"
196 puts
197 puts "Set PKG_BUILD environment variable if you do a subrelease (0.9.4.2008_08_02 when version is 0.9.4)"
198 end
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
199 end
200
201 desc "Publish Merb More gem to RubyForge, one by one."
202 task :merb_more_gems => [ :build_gems ] do
4e96612 @michaelklishin Tweaked rake tasks after release. Updated Contributors file.
michaelklishin authored
203 merb_more_gems.each do |gem|
e67aec9 @fabien Tiny Rakefile fix
fabien authored
204 Dir.chdir(gem){ sh "#{Gem.ruby} -S rake release" }
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
205 end
206 end
207
208 desc "Publish Merb release files to RubyForge."
209 task :merb => [ :package ] do
210 require 'rubyforge'
cdb515f @wycats Update release task to be relatively useful
wycats authored
211
212 r = RubyForge.new
213 r.configure
214
215 puts "\nLogging in...\n\n"
216 r.login
217
218 merb_release.each do |project, packages|
219 packages.each do |package|
220 begin
221 puts "Adding #{project}: #{package}"
222 file = "gems/#{package}-#{PKG_VERSION}.gem"
223 r.add_release project, package, Merb::VERSION, file
224 r.add_file project, package, Merb::VERSION, file
225 rescue Exception => e
226 if e.message =~ /You have already released this version/
227 puts "You already released #{project}: #{package}. Continuing\n\n"
228 else
229 raise e
230 end
231 end
232 end
0fed718 @michaelklishin Update -more release task.
michaelklishin authored
233 end
cdb515f @wycats Update release task to be relatively useful
wycats authored
234
3079592 @michaelklishin Add release tasks to merb-more sub gems as well as some related fixes…
michaelklishin authored
235 end
236 end
0fed718 @michaelklishin Update -more release task.
michaelklishin authored
237
e428cdb @michaelklishin Make everything in -more respond to rake spec. Test all the f...ng time!
michaelklishin authored
238 desc "Run spec examples for Merb More gems, one by one."
239 task :spec do
66a4df8 @adelcambre updated the root rake file to not be just merb more
adelcambre authored
240 merb_gem_paths.each do |gem|
8af100d @fabien Thanks Carllerche; adapted merb-slices to use the fixed router (slash…
fabien authored
241 Dir.chdir(gem) { sh "#{Gem.ruby} -S rake spec" }
e428cdb @michaelklishin Make everything in -more respond to rake spec. Test all the f...ng time!
michaelklishin authored
242 end
243 end
244
245 desc 'Default: run spec examples for all the gems.'
246 task :default => 'spec'
247
Something went wrong with that request. Please try again.