lib/deliver/upload_screenshots.rb in deliver-1.2.0 vs lib/deliver/upload_screenshots.rb in deliver-1.3.0
- old
+ new
@@ -1,9 +1,11 @@
module Deliver
# upload screenshots to iTunes Connect
class UploadScreenshots
def upload(options, screenshots)
+ return if options[:skip_screenshots]
+
app = options[:app]
v = app.edit_version
raise "Could not find a version to edit for app '#{app.name}'".red unless v
@@ -43,9 +45,11 @@
v.save!
Helper.log.info "Successfully uploaded screenshots to iTunes Connect".green
end
def collect_screenshots(options)
+ return [] if options[:skip_screenshots]
+
screenshots = []
extensions = '{png,jpg,jpeg}'
Dir.glob(File.join(options[:screenshots_path], "*"), File::FNM_CASEFOLD).sort.each do |lng_folder|
language = File.basename(lng_folder)