lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.6.0.pre.1 vs lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.6.0

- old
+ new

@@ -49,10 +49,11 @@ params[:html_file_name] = config[:html_file_name] params[:version_template_path] = config[:version_template_path] params[:version_file_name] = config[:version_file_name] params[:acl] = config[:acl] params[:installation_password] = config[:installation_password] + params[:release_notes] = config[:release_notes] case platform when :ios upload_ios(params) when :android @@ -72,10 +73,11 @@ ipa_file = params[:ipa] icon_file = params[:icon] dsym_file = params[:dsym] acl = params[:acl] installation_password = params[:installation_password] + release_notes = params[:release_notes] validate(params) UI.user_error!("No IPA file path given, pass using `ipa: 'ipa path'`") unless ipa_file.to_s.length > 0 bucket = get_bucket(s3_access_key, s3_secret_access_key, s3_region, s3_bucket) @@ -84,11 +86,11 @@ info = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(ipa_file) build_number = info['CFBundleVersion'] bundle_id = info['CFBundleIdentifier'] bundle_version = info['CFBundleShortVersionString'] - app_name = info['CFBundleName'] + app_name = info['CFBundleDisplayName'] || info['CFBundleName'] full_version = "#{bundle_version}.#{build_number}" url_part = get_url_part(app_name, "ios", bundle_version, build_number) plist_template_path = params[:plist_template_path] html_file_name = params[:html_file_name] @@ -113,11 +115,10 @@ dsym_url = self.upload_file(bucket, dsym_file_name, dsym_file_data, acl) # Setting action and environment variables Actions.lane_context[SharedValues::S3_DSYM_OUTPUT_PATH] = dsym_url ENV[SharedValues::S3_DSYM_OUTPUT_PATH.to_s] = dsym_url - end if params[:upload_metadata] == false return true end @@ -164,11 +165,12 @@ installation_password: installation_password, app_version: bundle_version, build_number: build_number, app_name: app_name, app_icon: icon_url, - platform: "ios" + platform: "ios", + release_notes: release_notes }) # Creates version from template if version_template_path && File.exist?(version_template_path) version_template = eth.load_from_path(version_template_path) @@ -225,10 +227,11 @@ s3_bucket = params[:bucket] apk_file = params[:apk] icon_file = params[:icon] acl = params[:acl] installation_password = params[:installation_password] + release_notes = params[:release_notes] validate(params) UI.user_error!("No APK file path given, pass using `apk: 'apk path'`") unless apk_file.to_s.length > 0 bucket = get_bucket(s3_access_key, s3_secret_access_key, s3_region, s3_bucket) @@ -273,11 +276,12 @@ installation_password: installation_password, app_version: app_version, build_number: build_number, app_name: app_name, app_icon: icon_url, - platform: "android" + platform: "android", + release_notes: release_notes }) html_url = self.upload_file(bucket, html_file_name, html_render, acl) self.upload_directory(bucket, html_resources_name, "#{__dir__}/../templates/installation-page", acl) @@ -507,10 +511,16 @@ default_value: "public_read"), FastlaneCore::ConfigItem.new(key: :installation_password, env_name: "INSTALLATION_PASSWORD", description: "Password for installation page", optional: true, - default_value: nil) + default_value: nil), + FastlaneCore::ConfigItem.new(key: :release_notes, + env_name: "S3_RELEASE_NOTES", + description: "Release notes", + type: Array, + optional: true, + default_value: Actions.lane_context[SharedValues::RELEASE_NOTES] ? Actions.lane_context[SharedValues::RELEASE_NOTES].split("\n") : nil) ] end def self.output [