lib/tasks/publish.rake in daddy-0.0.21 vs lib/tasks/publish.rake in daddy-0.0.22
- old
+ new
@@ -7,12 +7,20 @@
if File.exist?("#{Rails.root}/db/schema.rb")
ret = system("bundle exec rake db:schema:load RAILS_ENV=test")
fail unless ret
end
- system("bundle exec rake dad:cucumber PUBLISH=true EXPAND=false OUTPUT_FILE=diary.html features/開発日記")
- system("bundle exec rake dad:cucumber PUBLISH=true EXPAND=false OUTPUT_FILE=index.html features/仕様書")
+ system("mkdir -p features/reports")
+ system("rm -Rf features/reports/*")
+ system("bundle exec rake dad:cucumber PUBLISH=true EXPAND=false features/開発日記")
+ system("mkdir -p features/reports/diary")
+ system("mv features/reports/index.html features/reports/diary")
+ system("mv features/reports/screenshots features/reports/diary")
+ system("bundle exec rake dad:cucumber PUBLISH=true EXPAND=false features/仕様書")
+ system("mkdir -p features/reports/spec")
+ system("mv features/reports/index.html features/reports/spec")
+ system("mv features/reports/screenshots features/reports/spec")
if ENV['BRANCH']
current_branch = ENV['BRANCH']
else
git = Daddy::Git.new
@@ -22,14 +30,11 @@
dir = '/var/lib/daddy/spec'
system("sudo mkdir -p #{dir}")
system("sudo chown -R #{ENV['USER']}:#{ENV['USER']} #{dir}")
system("mkdir -p #{dir}/#{current_branch}")
-
- system("rm -Rf #{dir}/#{current_branch}/screenshots")
+ system("rm -Rf #{dir}/#{current_branch}/*")
system("cp -Rf features/reports/* #{dir}/#{current_branch}/")
-
- system("rm -Rf #{dir}/#{current_branch}/coverage")
system("cp -Rf coverage #{dir}/#{current_branch}/")
end
end