【问题标题】:Uploading to S3 with fastlane使用 fastlane 上传到 S3
【发布时间】:2016-08-26 02:55:45
【问题描述】:

我一直在使用 fastlane 将应用程序上传到曲棍球和 testflight。

我也想用于 S3 并检查他们的文档。我对S3的了解有限。

https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

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 is you use `ipa` to build
  dsym: 'AppName.app.dSYM.zip',                   # Optional is 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
)

如果我需要上传到 /Main/bin/Dev,我的存储桶将是 Main。但是我在哪里以及如何描述我的路径?它在这里(路径:) 吗?

他们这么说

建议不要将 AWS 访问密钥存储在 Fastfile 中。

如果是这样,我可以将 AWS 访问密钥放在哪里?它仍将位于其中一个文本文件中,并将提交到 svn 或 git。

【问题讨论】:

    标签: ios fastlane


    【解决方案1】:

    这个想法是将它存储在一个环境变量中,通常人们为此使用.env。确保不提交 .版本控制中的文件。

    【讨论】:

    【解决方案2】:

    fastlane 的优点在于您始终可以下拉到 shell 以使用 aws s3 命​​令行工具进行上传。它还消除了在快速通道 s3 方法中提供所有列出的参数的需要。

    sh "aws s3 cp path_to_ipa path_in_s3_where you want to store" 
    

    这更容易也更灵活。这将在健身房完成并且您有一个要上传的 ipa 后调用。

    【讨论】:

      猜你喜欢
      • 2021-10-05
      • 1970-01-01
      • 2020-09-04
      • 1970-01-01
      • 2011-06-01
      • 1970-01-01
      • 2021-05-25
      • 2011-08-29
      • 2013-04-21
      相关资源
      最近更新 更多