From 2a656d0a9b29f2566acc92fd282392aa5261735d Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Tue, 9 Jul 2013 17:39:37 -0300 Subject: [PATCH] vagrant: Windows - Exclude README from ws_migration Windows doesn't differentiate between files with/without executable bit, so this can't be used to exclude the README file from the migrations to be executed, when the sources are accessed from a Windows partition. --- rakelib/workspace.rake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rakelib/workspace.rake b/rakelib/workspace.rake index c705899f58..5a928388d5 100644 --- a/rakelib/workspace.rake +++ b/rakelib/workspace.rake @@ -7,10 +7,11 @@ namespace :ws do task :migrate => MIGRATION_MARKER_DIR do Dir['ws_migrations/*'].select{|m| File.executable?(m)}.each do |migration| completion_file = File.join(MIGRATION_MARKER_DIR, File.basename(migration)) - if ! File.exist?(completion_file) + is_excluded = File.basename(migration).start_with?("README") + if ! File.exist?(completion_file) && ! is_excluded sh(migration) File.write(completion_file, "") end end unless SKIP_MIGRATIONS end -end \ No newline at end of file +end