Method: Codepipe::Init#copy_project

Defined in:
lib/codepipe/init.rb

#copy_projectObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/codepipe/init.rb', line 35

def copy_project
  puts "Initialize codepipeline project in .codepipeline"

  excludes = %w[.git]
  if @options[:mode] == "light"
    excludes += %w[
      settings.yml
      sns.rb
    ]
  end
  pattern = Regexp.new(excludes.join('|'))

  if @options[:template]
    directory ".", ".codepipeline", exclude_pattern: pattern
  else
    directory ".", exclude_pattern: pattern
  end
end