b0VIM 8.0]%~/joshJoshs-MacBook-Pro.local~josh/Projects/fastlane/fastlane/supply/lib/supply/uploader.rb 3210#"! UtpTLU_kPkad)T. < ;  U - " M 4 (   a   g ] U T ) i \PO"_}|_4\[Ztjba releases = track.releases track = tracks.first return nil, nil if tracks.empty? tracks = client.tracks(track) def fetch_track_and_release!(track, version_code, status = nil) end end end upload_changelogs(release_notes, release, track) unless release_notes.empty? end release_notes << upload_changelog(language, version_code) unless Supply.config[:skip_upload_changelogs] upload_screenshots(language) unless Supply.config[:skip_upload_screenshots] upload_images(language) unless Supply.config[:skip_upload_images] upload_metadata(language, listing) unless Supply.config[:skip_upload_metadata] listing = client.listing_for_language(language) UI.message("Preparing to upload for language '#{language}'...") next if language.start_with?('.') # e.g. . or .. or hidden folders all_languages.each do |language| release_notes = [] UI.user_error!("Could not find release for version code '#{version_code}' to update changelog") unless release UI.user_error!("Unable to find the requested track - '#{Supply.config[:track]}'") unless track track, release = fetch_track_and_release!(Supply.config[:track], version_code) UI.user_error!("Could not find folder #{metadata_path}") unless File.directory?(metadata_path) version_codes.each do |version_code| end version_codes.to_s == "" version_codes = version_codes.reject do |version_code| version_codes = [Supply.config[:version_code]] if version_codes.empty? # Use version code from config if version codes is empty and no nil or empty string if (!Supply.config[:skip_upload_metadata] || !Supply.config[:skip_upload_images] || !Supply.config[:skip_upload_changelogs] || !Supply.config[:skip_upload_screenshots]) && metadata_path def perform_upload_meta(version_codes) end end UI.success("Successfully finished the upload to Google Play") client.commit_current_edit! UI.message("Uploading all changes to Google Play...") else UI.success("Successfully validated the upload to Google Play") client.validate_current_edit! UI.message("Validating all changes with Google Play...") if Supply.config[:validate_only] perform_upload_meta(apk_version_codes) end end update_rollout elsif !Supply.config[:rollout].nil? && Supply.config[:track].to_s != "" promote_track if Supply.config[:track_promote_to] # Only promote or rollout if we don't have version codes else update_track(apk_version_codes) # Updating a track with empty version codes can completely clear out a track # update_track handle setting rollout if needed # Only update tracks if we have version codes if !apk_version_codes.empty? apk_version_codes.concat(Supply.config[:version_codes_to_retain]) if Supply.config[:version_codes_to_retain] upload_mapping(apk_version_codes) apk_version_codes.concat(upload_bundles) unless Supply.config[:skip_upload_aab] apk_version_codes.concat(upload_apks) unless Supply.config[:skip_upload_apk] apk_version_codes = [] verify_config! client.begin_edit(package_name: Supply.config[:package_name]) FastlaneCore::PrintTable.print_values(config: Supply.config, hide_keys: [:issuer], mask_keys: [:json_key_data], title: "Summary for supply #{Fastlane::VERSION}") def perform_upload class Uploader # rubocop:disable Metrics/ClassLengthmodule Supplyad]PY0%_WV r P H G 8    | 3 h $     O 3 c J ) jVJ%QeB3 end # rubocop:enable Metrics/ClassLength end end end 'patch' elsif filename.include?('patch') 'main' if filename.include?('main') filename = File.basename(obb_file_path, ".obb") def obb_expansion_file_type(obb_file_path) end expansion_file_type: expansion_file_type) apk_version_code: apk_version_code, client.upload_obb(obb_file_path: obb_path, UI.message("Uploading obb file #{obb_path}...") def upload_obb(obb_path, expansion_file_type, apk_version_code) end expansion_paths end expansion_paths[type] = path end return {} UI.important("If you'd like this to work differently, please submit an issue.") UI.important("Can only upload one '#{type}' apk expansion. Skipping obb upload entirely.") if expansion_paths[type] next unless type type = obb_expansion_file_type(path) paths.each do |path| expansion_paths = {} paths = Dir.glob(search, File::FNM_CASEFOLD) search = File.join(File.dirname(apk_path), '*.obb') def find_obbs(apk_path) # { 'main' => 'path/to/main.obb', 'patch' => 'path/to/patch.obb' } # E.g. # keyed by their detected expansion file type # @return a map of the obb paths for that apk end end end upload_obb(expansion_paths[type], type, apk_version_code) if expansion_paths[type] ['main', 'patch'].each do |type| expansion_paths = find_obbs(apk_path) def upload_obbs(apk_path, apk_version_code) # more than one of either of them. # upload at most one main and one patch file. Do nothing if it finds # searches for obbs in the directory where the apk is located and end Supply.config[:metadata_path] def metadata_path end @client ||= Client.make_from_config def client end .sort { |x, y| x <=> y } .reject { |f| f.start_with?('.') } .select { |f| File.directory?(File.join(metadata_path, f)) } Dir.entries(metadata_path) def all_languages # returns only language directories from metadata_path end client.update_track(Supply.config[:track], track) end ) releases: [track_release] track: Supply.config[:track], track = AndroidPublisher::Track.new( else track.releases = [track_release] # Google Play will keep previous releases there this release is a partial rollout # Its okay to set releases to an array containing the newest release