Skip to content
Extraits de code Groupes Projets
Valider bf4fb994 rédigé par Dis McCarthy's avatar Dis McCarthy
Parcourir les fichiers

deploy the currently checked-out branch

parent ecd79766
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -18,6 +18,21 @@ set :scm_verbose, true
set :repository_cache, "remote_cache"
set :deploy_via, :checkout
# Bonus! Colors are pretty!
def red(str)
"\e[31m#{str}\e[0m"
end
# Figure out the name of the current local branch
def current_git_branch
branch = `git symbolic-ref HEAD 2> /dev/null`.strip.gsub(/^refs\/heads\//, '')
puts "Deploying branch #{red branch}"
branch
end
# Set the deploy branch to the current branch
set :branch, current_git_branch
namespace :deploy do
task :symlink_config_files do
run "ln -s -f #{shared_path}/config/database.yml #{current_path}/config/database.yml"
......
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