deliver/lib/deliver/setup.rb in fastlane-2.96.1 vs deliver/lib/deliver/setup.rb in fastlane-2.97.0
- old
+ new
@@ -22,25 +22,27 @@
end
def setup_deliver(file_path, data, deliver_path, options)
File.write(file_path, data)
+ screenshots_path = options[:screenshots_path] || File.join(deliver_path, 'screenshots')
unless options[:skip_screenshots]
- download_screenshots(deliver_path, options)
+ download_screenshots(screenshots_path, options)
# Add a README to the screenshots folder
- FileUtils.mkdir_p(File.join(deliver_path, 'screenshots')) # just in case the fetching didn't work
- File.write(File.join(deliver_path, 'screenshots', 'README.txt'), File.read("#{Deliver::ROOT}/lib/assets/ScreenshotsHelp"))
+ FileUtils.mkdir_p(screenshots_path) # just in case the fetching didn't work
+ File.write(File.join(screenshots_path, 'README.txt'), File.read("#{Deliver::ROOT}/lib/assets/ScreenshotsHelp"))
end
UI.success("Successfully created new Deliverfile at path '#{file_path}'")
end
# This method takes care of creating a new 'deliver' folder, containing the app metadata
# and screenshots folders
def generate_deliver_file(deliver_path, options)
v = options[:app].latest_version
- generate_metadata_files(v, File.join(deliver_path, 'metadata'))
+ metadata_path = options[:metadata_path] || File.join(deliver_path, 'metadata')
+ generate_metadata_files(v, metadata_path)
# Generate the final Deliverfile here
return File.read(deliverfile_path)
end