lib/tdiary/tasks/release.rake in tdiary-4.1.1 vs lib/tdiary/tasks/release.rake in tdiary-4.1.2
- old
+ new
@@ -32,27 +32,38 @@
if repo == 'tdiary-core' then
Dir.chdir 'tdiary-core' do
sh "chmod +x index.rb index.fcgi update.rb update.fcgi"
sh 'rake doc'
Bundler.with_clean_env do
- sh "bundle --path .bundle --without coffee:server:development:test"
+ sh "bundle --path .bundle --without coffee:development:test"
end
+
+ # reduce filesize
+ Dir.glob('.bundle/ruby/*/cache/*').each do |file|
+ # cached gem file
+ rm_rf file
+ end
+ Dir.glob('.bundle/ruby/*/gems/*/*/').each do |dir|
+ # spec, fixtures etc..
+ rm_rf dir unless File.basename(dir).match(/lib|data/)
+ end
+
Dir.chdir '.bundle/ruby' do
v = `ls`.chomp
case v
+ when '2.2.0'
+ FileUtils.cp_r '2.2.0', '2.0.0'
+ FileUtils.cp_r '2.2.0', '2.1.0'
when '2.1.0'
- FileUtils.cp_r '2.1.0', '1.9.1'
FileUtils.cp_r '2.1.0', '2.0.0'
+ FileUtils.cp_r '2.1.0', '2.2.0'
when '2.0.0'
- FileUtils.cp_r '2.0.0', '1.9.1'
FileUtils.cp_r '2.0.0', '2.1.0'
- when '1.9.1'
- FileUtils.cp_r '1.9.1', '2.0.0'
- FileUtils.cp_r '1.9.1', '2.1.0'
+ FileUtils.cp_r '2.0.0', '2.2.0'
else
+ FileUtils.cp_r v, '2.2.0'
FileUtils.cp_r v, '2.1.0'
FileUtils.cp_r v, '2.0.0'
- FileUtils.cp_r v, '1.9.1'
FileUtils.rm_rf v
end
end
Dir.chdir 'misc/lib' do
sh 'gem unpack bundler'