fastlane-plugin-aws_s3 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab7df234ba9810ff1613f638f322f3b1a11655a84fd20adbd2c6c69254ddf008
4
- data.tar.gz: ecd07e315bd0617bea86f701873eb24816faaf13c7e8b63402d2570a948fa8ba
3
+ metadata.gz: 594f0be26c1299aa2e30916f9cd14fa27f0018577ed7f1a57bc85c925c265e09
4
+ data.tar.gz: aac3d5fcd0522cf8c1a92b6ef31cfed1183b915eb06f3ff193b41ac1187c8f23
5
5
  SHA512:
6
- metadata.gz: a1967704db6369e636f52ef318cb345d8022d140d657935c98fea7a6388d15c71f3ba67e1ae937e288922c0d1a53e774d9ec410098b576c3e94011d1d1241abe
7
- data.tar.gz: 6e48fdd0b70c3e421510af90779fb55c2a2d91c397871daa0861da758629c693e6241a70dd927382c0f5dbe2f6f7c142cb12cdde87d7a01ecf66d0d5a537c9c9
6
+ metadata.gz: a125b9f244360d5ffecc66121765a2e764c02af654de7237260ca6ae1a5d8322decec7cfd77543135ca90d661efeb67e9e49b212d19889cb612903dba3794b9f
7
+ data.tar.gz: 47cd761ae03280ad801e95f30b3aeefc40d7e27593d10ec561b38a7e5f49f7b1a9f793515db2789cfdfecf2619663143300733b47f40127cbfea15fc6360a383
data/README.md CHANGED
@@ -32,13 +32,13 @@ You can also customize a lot of options:
32
32
  ```ruby
33
33
  aws_s3(
34
34
  # All of these are used to make Shenzhen's `ipa distribute:s3` command
35
- access_key: ENV['S3_ACCESS_KEY'], # Required from user (unless using aws_profile).
36
- secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], # Required from user (unless using aws_profile).
37
- aws_profile: ENV['AWS_PROFILE'] # Required from user (unless using access_key and secret_access_key)
35
+ access_key: ENV['S3_ACCESS_KEY'], # Optional - defaults to AWS Instance Profile Creds.
36
+ secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], # Optional - defaults to AWS Instance Profile Creds.
37
+ aws_profile: ENV['AWS_PROFILE'], # Optional - defaults to AWS Instance Profile Creds. (overrides if access_key and secret_access_key specified)
38
38
  bucket: ENV['S3_BUCKET'], # Required from user.
39
39
  region: ENV['S3_REGION'], # Required from user.
40
40
  acl: ENV['S3_ACL'], # Optional - defaults to 'public-read'
41
- server_side_encryption: ENV['S3_SERVER_SIDE_ENCRYPTION'] # Optional
41
+ server_side_encryption: ENV['S3_SERVER_SIDE_ENCRYPTION'], # Optional
42
42
 
43
43
  endpoint: 'https://s3-us-west-1.amazonaws.com', # Optional, for buckets that require a specific endpoint
44
44
  ipa: 'AppName.ipa', # Required (if not uploading an APK).
@@ -55,7 +55,7 @@ aws_s3(
55
55
  )
56
56
  ```
57
57
 
58
- It is recommended to **not** store the AWS access keys in the `Fastfile`.
58
+ It is recommended to **not** store the AWS access keys in the `Fastfile`. You can use [AWS Instance Profiles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) by attaching IAM roles to your EC2 configurations.
59
59
 
60
60
  The uploaded `version.json` file provides an easy way for apps to poll if a new update is available. The JSON looks like:
61
61
 
@@ -83,7 +83,7 @@
83
83
  </p>
84
84
 
85
85
  <p id="footnote">
86
- This is a beta version and is not meant to share with the public.
86
+ This is a beta version and is not intended for public sharing.
87
87
  </p>
88
88
  <img src="https://fastlane.tools/assets/images/fastlane-logo-lockup.png" id="fastlaneLogo" />
89
89
  </body>
@@ -84,7 +84,7 @@
84
84
  </p>
85
85
 
86
86
  <p id="footnote">
87
- This is a beta version and is not meant to share with the public.
87
+ This is a beta version and is not intended for public sharing.
88
88
  </p>
89
89
  <img src="https://fastlane.tools/assets/images/fastlane-logo-lockup.png" id="fastlaneLogo" />
90
90
  </body>
@@ -74,10 +74,6 @@ module Fastlane
74
74
  acl = params[:acl].to_sym
75
75
  server_side_encryption = params[:server_side_encryption]
76
76
 
77
- unless s3_profile
78
- UI.user_error!("No S3 access key given, pass using `access_key: 'key'` (or use `aws_profile: 'profile'`)") unless s3_access_key.to_s.length > 0
79
- UI.user_error!("No S3 secret access key given, pass using `secret_access_key: 'secret key'` (or use `aws_profile: 'profile'`)") unless s3_secret_access_key.to_s.length > 0
80
- end
81
77
  UI.user_error!("No S3 bucket given, pass using `bucket: 'bucket'`") unless s3_bucket.to_s.length > 0
82
78
  UI.user_error!("No IPA, APK file, folder or files paths given, pass using `ipa: 'ipa path'` or `apk: 'apk path'` or `folder: 'folder path' or files: [`file path1`, `file path 2`]") if ipa_file.to_s.length == 0 && apk_file.to_s.length == 0 && files.to_a.count == 0 && folder.to_s.length == 0
83
79
  UI.user_error!("Please only give IPA path or APK path (not both)") if ipa_file.to_s.length > 0 && apk_file.to_s.length > 0
@@ -85,8 +81,12 @@ module Fastlane
85
81
  require 'aws-sdk-s3'
86
82
  if s3_profile
87
83
  creds = Aws::SharedCredentials.new(profile_name: s3_profile);
88
- else
84
+ elsif s3_access_key.to_s.length > 0 && s3_secret_access_key.to_s.length > 0
89
85
  creds = Aws::Credentials.new(s3_access_key, s3_secret_access_key)
86
+ else
87
+ UI.important("No S3 access key or S3 secret access key given, using S3 instance profile by default.")
88
+ UI.important("If you want to use specific creds to S3 access, you can pass using `access_key: 'key'` and `secret_access_key: 'secret key'` (or use `aws_profile: 'profile'`)")
89
+ creds = Aws::InstanceProfileCredentials.new()
90
90
  end
91
91
  Aws.config.update({
92
92
  region: s3_region,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AwsS3
3
- VERSION = "1.7.0"
3
+ VERSION = "1.8.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-aws_s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3