Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (25 sloc) 0.697 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
namespace :heroku do
file 'tdiary.conf' => ['tdiary.conf.heroku'] do |t|
FileUtils.cp(t.prerequisites.first, t.name)
end

file '.htpasswd' do
Rake::Task["auth:password:create"].invoke
end

task :install => ['.htpasswd', 'tdiary.conf'] do |t|
sh "git checkout -b deploy"
sh "git add -f #{t.prerequisites.join(' ')}"
sh "git commit -m 'deploy'"
sh "git push heroku deploy:master"
# FIXME: heroku command does not work in rake env
# sh "heroku run rake db:create"
end

task :update do
# sh "git pull origin master:deploy"
# sh "git push heroku deploy:master"
raise NotImplementedError
end

task :clean do
sh "git checkout master"
sh "git branch -D deploy"
end
end
Something went wrong with that request. Please try again.