i am dumb. include custom mobile in before_deploy [ci skip]

This commit is contained in:
danielgrippi 2012-05-11 17:12:30 -07:00
parent 81661c883f
commit 871d3cc672

View file

@ -2,14 +2,16 @@ desc "include custom landing page before heroku san deploys"
task :before_deploy => :environment do task :before_deploy => :environment do
each_heroku_app do |stage| each_heroku_app do |stage|
home_file = stage.config['HOME_FILE_DESKTOP'] desktop_home_file = stage.config['HOME_FILE_DESKTOP']
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml mobile_home_file = stage.config['HOME_FILE_MOBILE']
if home_file.present? # Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
if desktop_home_file.present? || mobile_home_file.present?
puts "-----> custom landing page(s) detected..." puts "-----> custom landing page(s) detected..."
puts "-----> including custom landing page(s) in a temp commit" puts "-----> including custom landing page(s) in a temp commit"
@did_not_stash = system("git stash| grep 'No local changes to save'") @did_not_stash = system("git stash| grep 'No local changes to save'")
system("git add #{home_file} -f") ? true : fail system("git add #{desktop_home_file} -f") ? true : fail
system("git add #{mobile_home_file} -f") ? true : fail
system("git commit -m 'adding custom landing page(s) for heroku'") ? true : fail system("git commit -m 'adding custom landing page(s) for heroku'") ? true : fail
puts "-----> done" puts "-----> done"