Sha256: 86382573a074b9f26bcf9d5d91b9a181a9c3409081513107ee451911c4152d58

Contents?: true

Size: 809 Bytes

Versions: 69

Compression:

Stored size: 809 Bytes

Contents

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

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

69 entries across 58 versions & 1 rubygems

Version Path
tdiary-5.3.0 lib/tdiary/tasks/heroku.rake
tdiary-5.2.4 lib/tdiary/tasks/heroku.rake
tdiary-5.2.3 lib/tdiary/tasks/heroku.rake
tdiary-5.2.2 lib/tdiary/tasks/heroku.rake
tdiary-5.2.1 lib/tdiary/tasks/heroku.rake
tdiary-5.2.0 lib/tdiary/tasks/heroku.rake
tdiary-5.1.7 lib/tdiary/tasks/heroku.rake
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/tasks/heroku.rake
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/lib/tdiary/tasks/heroku.rake
tdiary-5.1.6 lib/tdiary/tasks/heroku.rake
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/tasks/heroku.rake
tdiary-5.1.5 lib/tdiary/tasks/heroku.rake
tdiary-5.1.4 lib/tdiary/tasks/heroku.rake
tdiary-5.1.3 lib/tdiary/tasks/heroku.rake
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/tasks/heroku.rake
tdiary-5.1.2 lib/tdiary/tasks/heroku.rake
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/tasks/heroku.rake
tdiary-5.1.1 lib/tdiary/tasks/heroku.rake
tdiary-5.1.0 lib/tdiary/tasks/heroku.rake
tdiary-5.0.14 lib/tdiary/tasks/heroku.rake