Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
capistrano 3 でサブディレクトリをデプロイするやつ
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
set :git_strategy, Capistrano::Git::SubDirectoryStrategy
set :project_root, 'front'
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