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

added before_deploy and after_deploy tasks

parent 356494b7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
desc "revert custom landing page commit after heroku san deploys"
task :after_deploy => :environment do
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
if File.exist?(File.join(Rails.root, "app", "views", "home", "_show.html.haml")) && system("git log | head -5 | grep 'custom\ landing\ page'")
puts "-----> resetting HEAD before custom landing page commit"
system("git reset --hard HEAD^") ? true : fail
puts "-----> done"
end
end
desc "include custom landing page before heroku san deploys"
task :before_deploy => :environment do
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
if File.exist?(File.join(Rails.root, "app", "views", "home", "_show.html.haml"))
puts "-----> custom landing page detected..."
puts "-----> including custom landing page in a temp commit"
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
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