fastlane-plugin-aws_s3 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf25b6b9b17c5e1ecab636e6cca8774c1c107f95
4
- data.tar.gz: a3f657dd480e94d66593c8ea5f2ad1dfdb987360
3
+ metadata.gz: 1a352c57e53f5406a111832c0fd3b14c92db1683
4
+ data.tar.gz: 76c4956e0f8f3abd737f3a40064cffef2802f849
5
5
  SHA512:
6
- metadata.gz: a796219f0d215c9ad032ae8d49bd01a12b0c7896dcc5b5cb049bc1ff8cf0039cd2525528483e0e91c48799f81af37a2dab5f93d94dae71b384a7099701af6dc3
7
- data.tar.gz: f48b0e1685a567aa2f9019d77342a639eb8792bd7f04e71b1949e89d1cf0c22338c2c7ee11c3e48576eb5cd81f37522bc90fbfd50e1d5bb0c4426759e3793b24
6
+ metadata.gz: 6ed8f148df62eb74aa7de573ba140a564b3a02126d1c37256570e6ac0f68ea1ce844e5401172dcf201a7e943b847023cd7487c6d004a9ea16c704d3743ea0d50
7
+ data.tar.gz: c577cdf27707fc409ab0bdd4b89334a86017e551a92ee15ad79c0291ba37ce90f9b06a3a88a108c0332fff5ee9a5d6b9d66d723796443c4174ab7e0ac23b277d
data/README.md CHANGED
@@ -1,30 +1,36 @@
1
- # fastlane-plugin-s3 `fastlane` Plugin
1
+ # aws_s3 `fastlane` Plugin
2
2
 
3
- [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-s3)
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-aws_s3)
4
4
 
5
5
  ## Getting Started
6
6
 
7
7
  This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To get started with fastlane-plugin-s3, add it to your project by running:
8
8
 
9
9
  ```bash
10
- fastlane add_plugin s3
10
+ fastlane add_plugin aws_s3
11
11
  ```
12
12
 
13
- ## About s3
13
+ ## About aws_s3
14
14
 
15
15
  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.
16
16
 
17
- The `s3` action can upload both iOS apps (IPAs) and Android apps (APKs). It is **highly** suggested that you make a separate bucket for each of the apps.
17
+ The `aws_s3` action can upload both iOS apps (IPAs) and Android apps (APKs). It is **highly** suggested that you make a separate bucket for each of the apps.
18
18
 
19
- Add the `s3` action after the `gym` step:
19
+ Below is what the default generated page looks like that gets hosted on S3.
20
+
21
+ ![Generated page](aws_s3_screenshot.png)
22
+
23
+ ## Example
24
+
25
+ Add the `aws_s3` action after the `gym` step:
20
26
 
21
27
  ```ruby
22
- s3
28
+ aws_s3
23
29
  ```
24
30
 
25
31
  You can also customize a lot of options:
26
32
  ```ruby
27
- s3(
33
+ aws_s3(
28
34
  # All of these are used to make Shenzhen's `ipa distribute:s3` command
29
35
  access_key: ENV['S3_ACCESS_KEY'], # Required from user.
30
36
  secret_access_key: ENV['S3_SECRET_ACCESS_KEY'], # Required from user.
@@ -54,12 +60,6 @@ The uploaded `version.json` file provides an easy way for apps to poll if a new
54
60
  }
55
61
  ```
56
62
 
57
- ## Example
58
-
59
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
60
-
61
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
62
-
63
63
  ## Issues and Feedback
64
64
 
65
65
  For any other issues and feedback about this plugin, please submit it to this repository.
@@ -75,3 +75,10 @@ For more information about how the `fastlane` plugin system works, check out the
75
75
  ## About `fastlane`
76
76
 
77
77
  `fastlane` automates building, testing, and releasing your app for beta and app store distributions. To learn more about `fastlane`, check out [fastlane.tools](https://fastlane.tools).
78
+
79
+ ## Author
80
+
81
+ Josh Holtz, josh@rokkincat.com, [@joshdholtz](https://twitter.com/joshdholtz)
82
+
83
+ I'm available for freelance work (Fastlane, iOS, and Android development) :muscle:
84
+ Feel free to contact me :rocket:
@@ -5,12 +5,12 @@ require 'ostruct'
5
5
  module Fastlane
6
6
  module Actions
7
7
  module SharedValues
8
- S3_APK_OUTPUT_PATH = :S3_APK_OUTPUT_PATH
9
- S3_IPA_OUTPUT_PATH = :S3_IPA_OUTPUT_PATH
10
- S3_DSYM_OUTPUT_PATH = :S3_DSYM_OUTPUT_PATH
11
- S3_PLIST_OUTPUT_PATH = :S3_PLIST_OUTPUT_PATH
12
- S3_HTML_OUTPUT_PATH = :S3_HTML_OUTPUT_PATH
13
- S3_VERSION_OUTPUT_PATH = :S3_VERSION_OUTPUT_PATH
8
+ S3_APK_OUTPUT_PATH ||= :S3_APK_OUTPUT_PATH
9
+ S3_IPA_OUTPUT_PATH ||= :S3_IPA_OUTPUT_PATH
10
+ S3_DSYM_OUTPUT_PATH ||= :S3_DSYM_OUTPUT_PATH
11
+ S3_PLIST_OUTPUT_PATH ||= :S3_PLIST_OUTPUT_PATH
12
+ S3_HTML_OUTPUT_PATH ||= :S3_HTML_OUTPUT_PATH
13
+ S3_VERSION_OUTPUT_PATH ||= :S3_VERSION_OUTPUT_PATH
14
14
  end
15
15
 
16
16
  class AwsS3Action < Action
@@ -36,7 +36,6 @@ module Fastlane
36
36
 
37
37
  # Pulling parameters for other uses
38
38
  s3_region = params[:region]
39
- s3_subdomain = params[:region] ? "s3-#{params[:region]}" : "s3"
40
39
  s3_access_key = params[:access_key]
41
40
  s3_secret_access_key = params[:secret_access_key]
42
41
  s3_bucket = params[:bucket]
@@ -60,13 +59,13 @@ module Fastlane
60
59
 
61
60
  s3_client = Aws::S3::Client.new
62
61
 
63
- upload_ipa(s3_client, params, s3_region, s3_subdomain, s3_access_key, s3_secret_access_key, s3_bucket, ipa_file, dsym_file, s3_path, acl) if ipa_file.to_s.length > 0
64
- upload_apk(s3_client, params, s3_region, s3_subdomain, s3_access_key, s3_secret_access_key, s3_bucket, apk_file, s3_path, acl) if apk_file.to_s.length > 0
62
+ upload_ipa(s3_client, params, s3_region, s3_access_key, s3_secret_access_key, s3_bucket, ipa_file, dsym_file, s3_path, acl) if ipa_file.to_s.length > 0
63
+ upload_apk(s3_client, params, s3_region, s3_access_key, s3_secret_access_key, s3_bucket, apk_file, s3_path, acl) if apk_file.to_s.length > 0
65
64
 
66
65
  return true
67
66
  end
68
67
 
69
- def self.upload_ipa(s3_client, params, s3_region, s3_subdomain, s3_access_key, s3_secret_access_key, s3_bucket, ipa_file, dsym_file, s3_path, acl)
68
+ def self.upload_ipa(s3_client, params, s3_region, s3_access_key, s3_secret_access_key, s3_bucket, ipa_file, dsym_file, s3_path, acl)
70
69
 
71
70
  s3_path = "v{CFBundleShortVersionString}_b{CFBundleVersion}/" unless s3_path
72
71
 
@@ -122,7 +121,6 @@ module Fastlane
122
121
 
123
122
  # Creating plist and html names
124
123
  plist_file_name = "#{url_part}#{title.delete(' ')}.plist"
125
- plist_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{plist_file_name}"
126
124
 
127
125
  html_file_name ||= "index.html"
128
126
 
@@ -147,6 +145,13 @@ module Fastlane
147
145
  bundle_version: bundle_version,
148
146
  title: title
149
147
  })
148
+
149
+ #####################################
150
+ #
151
+ # plist uploading
152
+ #
153
+ #####################################
154
+ plist_url = self.upload_file(s3_client, s3_bucket, plist_file_name, plist_render, acl)
150
155
 
151
156
  # Creates html from template
152
157
  if html_template_path && File.exist?(html_template_path)
@@ -181,11 +186,9 @@ module Fastlane
181
186
 
182
187
  #####################################
183
188
  #
184
- # html and plist uploading
189
+ # html uploading
185
190
  #
186
191
  #####################################
187
-
188
- plist_url = self.upload_file(s3_client, s3_bucket, plist_file_name, plist_render, acl)
189
192
  html_url = self.upload_file(s3_client, s3_bucket, html_file_name, html_render, acl)
190
193
  version_url = self.upload_file(s3_client, s3_bucket, version_file_name, version_render, acl)
191
194
 
@@ -202,7 +205,7 @@ module Fastlane
202
205
  UI.success("Successfully uploaded ipa file to '#{Actions.lane_context[SharedValues::S3_IPA_OUTPUT_PATH]}'")
203
206
  end
204
207
 
205
- def self.upload_apk(s3_client, params, s3_region, s3_subdomain, s3_access_key, s3_secret_access_key, s3_bucket, apk_file, s3_path, acl)
208
+ def self.upload_apk(s3_client, params, s3_region, s3_access_key, s3_secret_access_key, s3_bucket, apk_file, s3_path, acl)
206
209
  version = get_apk_version(apk_file)
207
210
 
208
211
  version_code = version[0]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AwsS3
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
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: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.4.5
135
+ rubygems_version: 2.5.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Upload IPA and APK to S3