lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.2.2 vs lib/fastlane/plugin/polidea/actions/s3.rb in fastlane-plugin-polidea-0.2.3

- old
+ new

@@ -205,18 +205,20 @@ ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH] = version_url ENV[SharedValues::S3_VERSION_OUTPUT_PATH.to_s] = version_url - Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH] = icon_url - ENV[SharedValues::S3_ICON_OUTPUT_PATH.to_s] = icon_url - UI.success("Successfully uploaded ipa file to '#{Actions.lane_context[SharedValues::S3_IPA_OUTPUT_PATH]}'") UI.success("Successfully uploaded plist file to '#{Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH]}'") UI.success("Successfully uploaded html file to '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'") UI.success("Successfully uploaded version file to '#{Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH]}'") - UI.success("Successfully uploaded icon file to '#{Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH]}'") + + if icon_url + Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH] = icon_url + ENV[SharedValues::S3_ICON_OUTPUT_PATH.to_s] = icon_url + UI.success("Successfully uploaded icon file to '#{Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH]}'") + end end def self.upload_android(params) # Pulling parameters for other uses s3_region = params[:region] @@ -289,15 +291,17 @@ self.upload_directory(bucket, html_resources_name, "#{__dir__}/../templates/installation-page", acl) Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_url ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url - Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH] = icon_url - ENV[SharedValues::S3_ICON_OUTPUT_PATH.to_s] = icon_url - UI.success("Successfully uploaded apk file to '#{Actions.lane_context[SharedValues::S3_APK_OUTPUT_PATH]}'") UI.success("Successfully uploaded html file to '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'") - UI.success("Successfully uploaded icon file to '#{Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH]}'") + + if icon_url + Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH] = icon_url + ENV[SharedValues::S3_ICON_OUTPUT_PATH.to_s] = icon_url + UI.success("Successfully uploaded icon file to '#{Actions.lane_context[SharedValues::S3_ICON_OUTPUT_PATH]}'") + end end def self.validate(params) s3_access_key = params[:access_key] s3_secret_access_key = params[:secret_access_key]