Skip to content
Extraits de code Groupes Projets
Valider 493553f9 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

working on making heroku_san magical

parent f3120b3d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -7,9 +7,11 @@ production: ...@@ -7,9 +7,11 @@ production:
config: config:
<<: *defaults <<: *defaults
BUNDLE_WITHOUT: "development:test" BUNDLE_WITHOUT: "development:test"
HOME_FILE: 'app/views/home/_show.html.haml'
staging: staging:
app: staging app: staging
stack: cedar stack: cedar
config: config:
<<: *defaults <<: *defaults
BUNDLE_WITHOUT: "development:test" BUNDLE_WITHOUT: "development:test"
HOME_FILE: 'app/views/home/_show.html.haml'
...@@ -6,7 +6,7 @@ task :after_deploy => :environment do ...@@ -6,7 +6,7 @@ task :after_deploy => :environment do
puts "-----> resetting HEAD before custom landing page commit" puts "-----> resetting HEAD before custom landing page commit"
system("git reset --hard HEAD^") ? true : fail system("git reset --hard HEAD^") ? true : fail
system("git stash pop") ? true : fail system("git stash pop") unless @did_not_stash
puts "-----> done" puts "-----> done"
end end
......
desc "include custom landing page before heroku san deploys" desc "include custom landing page before heroku san deploys"
task :before_deploy => :environment do task :before_deploy => :environment do
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml each_heroku_app do |name, app, repo|
if File.exist?(File.join(Rails.root, "app", "views", "home", "_show.html.haml")) home_file = @app_settings[name]['config']['HOME_FILE']
puts "-----> custom landing page detected..." # Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
if home_file.present?
puts "-----> custom landing page detected..."
puts "-----> including custom landing page in a temp commit" puts "-----> including custom landing page in a temp commit"
@did_not_stash = system("git stash| grep 'No local changes to save'")
system("git add #{home_file} -f") ? true : fail
system("git commit -m 'adding custom landing page for heroku'") ? true : fail
pp @app_settings puts "-----> done"
end
system("git stash") ? true : fail
system("git add app/views/home/_show.html.haml -f") ? true : fail
system("git commit -m 'adding custom landing page for heroku'") ? true : fail
puts "-----> done"
end end
end end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter