Created
January 22, 2015 11:22
-
-
Save rummelonp/c2e74b29190c828309ab to your computer and use it in GitHub Desktop.
capistrano 3 でサブディレクトリをデプロイするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'capistrano/git' | |
class Capistrano::Git | |
module SubDirectoryStrategy | |
include DefaultStrategy | |
def release | |
git :archive, fetch(:branch), fetch(:project_root), '| tar -x -C', release_path, "--strip=#{fetch(:project_root).count('/')+1}" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :git_strategy, Capistrano::Git::SubDirectoryStrategy | |
set :project_root, 'front' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :git_strategy, Capistrano::Git::SubDirectoryStrategy | |
set :project_root, 'server' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment