lib/tasks/publish.rake in daddy-0.0.16 vs lib/tasks/publish.rake in daddy-0.0.17

- old
+ new

@@ -2,12 +2,14 @@ require 'daddy/git' namespace :dad do task :publish do - ret = system("bundle exec rake db:schema:load RAILS_ENV=test") - fail unless ret + 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 tmp") @@ -16,10 +18,10 @@ current_branch = ENV['BRANCH'] else git = Daddy::Git.new current_branch = git.current_branch end - + unless File.exist?('tmp/gh-pages') system("cd tmp && git clone -b gh-pages git@github.com:ichylinux/daddy.git gh-pages") else system("cd tmp/gh-pages && git pull") end