Rakefile in leadlight-0.0.3 vs Rakefile in leadlight-0.0.4
- old
+ new
@@ -82,11 +82,11 @@
sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem"
end
desc "Build #{gem_file} into the pkg directory"
-task :build => :gemspec do
+task :build => [:gemspec, :update_bundle] do
sh "mkdir -p pkg"
sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg"
end
@@ -115,9 +115,15 @@
# piece file back together and write
manifest = " s.files = %w[\n#{files}\n ]\n"
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
File.open(gemspec_file, 'w') { |io| io.write(spec) }
puts "Updated #{gemspec_file}"
+end
+
+desc "Update #{name} in bundle"
+task :update_bundle => :validate do
+ `bundle update #{name}`
+ puts "Bundled #{name} version #{version}"
end
desc "Validate #{gemspec_file}"
task :validate do
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]