From db02c9b8271afd628b42141594cddd96d433bcc4 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Thu, 21 Mar 2013 12:42:02 -0700 Subject: [PATCH] Capistrano: deploy from fixed branch --- config/config.example.yml | 1 + config/deploy.example.rb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.example.yml b/config/config.example.yml index 45b4bef..c1e9cb6 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -57,6 +57,7 @@ deployment: app: errbit.example.com db: errbit.example.com repository: http://github.com/errbit/errbit.git + branch: master user: deploy deploy_to: /var/www/apps/errbit # setup path to unicorn pids folder (or deploy_to/shared/pids will be used) diff --git a/config/deploy.example.rb b/config/deploy.example.rb index 7f9b5b0..3b8b269 100644 --- a/config/deploy.example.rb +++ b/config/deploy.example.rb @@ -35,8 +35,7 @@ set :copy_compression, :bz2 set :scm, :git set :scm_verbose, true -set(:current_branch) { `git branch`.match(/\* (\S+)\s/m)[1] || raise("Couldn't determine current branch") } -set :branch, defer { current_branch } +set :branch, config['branch'] || 'master' before 'deploy:assets:symlink', 'errbit:symlink_configs' # if unicorn is started through something like runit (the tool which restarts the process when it's stopped) -- libgit2 0.21.2