File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ namespace :aws_deploy do
4646 aws_inform "Verificando se o deploy possui novas migrations..."
4747
4848 instance = AwsDeploy ::Instance . new ( credentials ) . find_all_in_service . first
49- remote_migrations_count = `ssh #{ instance [ :dns_name ] } "ls -1 #{ app_path } db/migrate/*.rb | wc -l"` . strip
50- local_migrations_count = `ls -1 #{ Rails . root } /db/migrate/*.rb | wc -l` . strip
49+ unless instance . nil?
50+ remote_migrations_count = `ssh #{ instance [ :dns_name ] } "ls -1 #{ app_path } db/migrate/*.rb | wc -l"` . strip
51+ local_migrations_count = `ls -1 #{ Rails . root } /db/migrate/*.rb | wc -l` . strip
5152
52- if remote_migrations_count != local_migrations_count
53- raise "O deploy possui novas migrations, você não pode usar a opção 'fast'!"
53+ if remote_migrations_count != local_migrations_count
54+ raise "O deploy possui novas migrations, você não pode usar a opção 'fast'!"
55+ end
5456 end
5557 end
5658
You can’t perform that action at this time.
0 commit comments