From fdc5b2d8eef5e1669007e8db1ab80067039ff0f4 Mon Sep 17 00:00:00 2001 From: Viktor Benei Date: Wed, 2 Dec 2015 16:32:34 +0100 Subject: [PATCH] upload file filtering revision, to only print the files which will be uploaded --- step.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/step.rb b/step.rb index e4bab28e..a18d3428 100644 --- a/step.rb +++ b/step.rb @@ -47,7 +47,7 @@ def fail_with_message(message) fail_with_message('No deploy_path provided') unless options[:deploy_path] if !Dir.exist?(options[:deploy_path]) && !File.exist?(options[:deploy_path]) - fail_with_message('Deploy source path does not exist at the provided path') + fail_with_message('Deploy source path does not exist at the provided path: ' + options[:deploy_path]) end puts @@ -96,16 +96,19 @@ def fail_with_message(message) entries.delete('.') entries.delete('..') + entries = entries + .map { |e| File.join(options[:deploy_path], e) } + .select { |e| !File.directory?(e) } + puts puts '======= List of files =======' puts ' No files found to deploy' if entries.length == 0 - entries.each { |filepth| puts " * #{filepth}" } if entries.length > 0 + entries.each { |filepth| puts " * #{filepth}" } puts '=============================' puts entries.each do |filepth| - disk_file_path = File.join(options[:deploy_path], filepth) - next if File.directory?(disk_file_path) + disk_file_path = filepth a_public_page_url = '' if disk_file_path.match('.*.ipa')