class Fastlane::Actions::S3Action

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 135
def self.author
  "joshdholtz"
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 36
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :ipa,
                                 env_name: "",
                                 description: ".ipa file for the build ",
                                 optional: true,
                                 default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :dsym,
                                 env_name: "",
                                 description: "zipped .dsym package for the build ",
                                 optional: true,
                                 default_value: Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :upload_metadata,
                                 env_name: "",
                                 description: "Upload relevant metadata for this build",
                                 optional: true,
                                 default_value: true,
                                 type: Boolean),
    FastlaneCore::ConfigItem.new(key: :plist_template_path,
                                 env_name: "",
                                 description: "plist template path",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :plist_file_name,
                                 env_name: "",
                                 description: "uploaded plist filename",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :html_template_path,
                                 env_name: "",
                                 description: "html erb template path",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :html_file_name,
                                 env_name: "",
                                 description: "uploaded html filename",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :version_template_path,
                                 env_name: "",
                                 description: "version erb template path",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :version_file_name,
                                 env_name: "",
                                 description: "uploaded version filename",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :access_key,
                                 env_name: "S3_ACCESS_KEY",
                                 description: "AWS Access Key ID ",
                                 sensitive: true,
                                 optional: true,
                                 default_value: ENV['AWS_ACCESS_KEY_ID'],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :secret_access_key,
                                 env_name: "S3_SECRET_ACCESS_KEY",
                                 description: "AWS Secret Access Key ",
                                 sensitive: true,
                                 optional: true,
                                 default_value: ENV['AWS_SECRET_ACCESS_KEY'],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :bucket,
                                 env_name: "S3_BUCKET",
                                 description: "AWS bucket name",
                                 optional: true,
                                 code_gen_sensitive: true,
                                 default_value: ENV['AWS_BUCKET_NAME'],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :region,
                                 env_name: "S3_REGION",
                                 description: "AWS region (for bucket creation) ",
                                 optional: true,
                                 code_gen_sensitive: true,
                                 default_value: ENV['AWS_REGION'],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :path,
                                 env_name: "S3_PATH",
                                 description: "S3 'path'. Values from Info.plist will be substituted for keys wrapped in {}  ",
                                 optional: true,
                                 default_value: 'v{CFBundleShortVersionString}_b{CFBundleVersion}/'),
    FastlaneCore::ConfigItem.new(key: :source,
                                 env_name: "S3_SOURCE",
                                 description: "Optional source directory e.g. ./build ",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :acl,
                                 env_name: "S3_ACL",
                                 description: "Uploaded object permissions e.g public_read (default), private, public_read_write, authenticated_read ",
                                 optional: true,
                                 default_value: "public_read")
  ]
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 161
def self.category
  :deprecated
end
deprecated_notes() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 165
def self.deprecated_notes
  [
    "Please use the `aws_s3` plugin instead.",
    "Install using `fastlane add_plugin aws_s3`."
  ].join("\n")
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 24
def self.description
  "Generates a plist file and uploads all to AWS S3"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 28
def self.details
  [
    "Upload a new build to Amazon S3 to distribute the build to beta testers.",
    "Works for both Ad Hoc and Enterprise signed applications. This step will generate the necessary HTML, plist, and version files for you.",
    "It is recommended to **not** store the AWS access keys in the `Fastfile`. The uploaded `version.json` file provides an easy way for apps to poll if a new update is available."
  ].join("\n")
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 143
def self.example_code
  [
    's3',
    's3(
      # All of these are used to make Shenzhen\'s `ipa distribute:s3` command
      access_key: ENV["S3_ACCESS_KEY"],               # Required from user.
      secret_access_key: ENV["S3_SECRET_ACCESS_KEY"], # Required from user.
      bucket: ENV["S3_BUCKET"],                       # Required from user.
      ipa: "AppName.ipa",                             # Optional if you use `ipa` to build
      dsym: "AppName.app.dSYM.zip",                   # Optional if you use `ipa` to build
      path: "v{CFBundleShortVersionString}_b{CFBundleVersion}/", # This is actually the default.
      upload_metadata: true,                          # Upload version.json, plist and HTML. Set to false to skip uploading of these files.
      version_file_name: "app_version.json",          # Name of the file to upload to S3. Defaults to "version.json"
      version_template_path: "path/to/erb"            # Path to an ERB to configure the structure of the version JSON file
    )'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 139
def self.is_supported?(platform)
  false
end
output() click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 125
def self.output
  [
    ['S3_IPA_OUTPUT_PATH', 'Direct HTTP link to the uploaded ipa file'],
    ['S3_DSYM_OUTPUT_PATH', 'Direct HTTP link to the uploaded dsym file'],
    ['S3_PLIST_OUTPUT_PATH', 'Direct HTTP link to the uploaded plist file'],
    ['S3_HTML_OUTPUT_PATH', 'Direct HTTP link to the uploaded HTML file'],
    ['S3_VERSION_OUTPUT_PATH', 'Direct HTTP link to the uploaded Version file']
  ]
end
run(config) click to toggle source
# File fastlane/lib/fastlane/actions/s3.rb, line 20
def self.run(config)
  UI.user_error!("Please use the `aws_s3` plugin instead. Install using `fastlane add_plugin aws_s3`.")
end