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-4.2.1 vendor/bundle/ruby/2.3.0/gems/tdiary-4.2.0/lib/tdiary/tasks/heroku.rake
tdiary-4.2.0 lib/tdiary/tasks/heroku.rake
tdiary-4.1.3 lib/tdiary/tasks/heroku.rake
tdiary-4.1.2 lib/tdiary/tasks/heroku.rake
tdiary-4.1.1 lib/tdiary/tasks/heroku.rake
tdiary-4.1.0 lib/tdiary/tasks/heroku.rake
tdiary-4.1.0.20141126 lib/tdiary/tasks/heroku.rake
tdiary-4.0.5.1 tdiary/tasks/heroku.rake
tdiary-4.0.5 tdiary/tasks/heroku.rake
tdiary-4.0.4 tdiary/tasks/heroku.rake
tdiary-4.0.3 tdiary/tasks/heroku.rake
tdiary-4.0.2.20140201 tdiary/tasks/heroku.rake
tdiary-4.0.2 tdiary/tasks/heroku.rake
tdiary-4.0.1.20131102 tdiary/tasks/heroku.rake
tdiary-4.0.1.20130929 tdiary/tasks/heroku.rake
tdiary-4.0.1.20130903 tdiary/tasks/heroku.rake
tdiary-4.0.1 tdiary/tasks/heroku.rake
tdiary-4.0.0.20130826 tdiary/tasks/heroku.rake
tdiary-4.0.0 tdiary/tasks/heroku.rake
tdiary-3.2.2.20130727 tdiary/tasks/heroku.rake