Method: Octopress::Deploy#check_gitignore
- Defined in:
- lib/octopress-deploy.rb
#check_gitignore ⇒ Object
Checks the repository’s .gitignore for the config file
returns: Boolean - whether it is present or not.
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/octopress-deploy.rb', line 131 def check_gitignore gitignore = File.join(`git rev-parse --show-toplevel`.strip, ".gitignore") if !File.exist?(gitignore) || File.open(gitignore).read.match(/^#{@options[:config_file]}/i).nil? puts "Remember to add #{@options[:config_file]} to your .gitignore." false else true end end |