|
|
@@ -43,9 +43,9 @@ module Petrify |
|
|
|
|
|
|
|
def self.setup |
|
|
|
# Recursively delete working directory to ensure no redundant files are left behind from previous builds. |
|
|
|
# FileUtils.rm_rf(@working_dir) |
|
|
|
# But preserve dot-files (especially .git directory) |
|
|
|
FileUtils.rm_r(Dir.glob(File.join(@@working_dir, '*'))) |
|
|
|
Dir.mkdir(@@working_dir) unless File.directory?(@@working_dir) |
|
|
|
# Dir.chdir(@working_dir) |
|
|
|
|
|
|
|
# Copy `public` dir to output dir |
|
|
|
FileUtils.copy_entry('public', @@working_dir) |
|
|
|