fastlane-plugin-aws_s3 0.2.5 → 0.2.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 384d78755eb4184c1eaff0d1e5ca53820367e031
|
4
|
+
data.tar.gz: 079c7f3475d1d87075229b33ef1b11fef7b11eca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee21202416b64bd3ef7e2aab5cde7628bc004068dfd7fc35fc92c93169350da44d6e2f1a0ae67a850113c3c7c6051c1cfbe5071d600ef3d81d3326cd53ecd7be
|
7
|
+
data.tar.gz: 7084aa5b148a7c2d86a4cc8d9bad9c606793772982337329271bb1ac18d1fb5c4f012c018b6f639aae98c49ea8a92340482c73d2dda31494e68a8cb7c2214387
|
@@ -13,6 +13,7 @@ module Fastlane
|
|
13
13
|
S3_PLIST_OUTPUT_PATH ||= :S3_PLIST_OUTPUT_PATH
|
14
14
|
S3_HTML_OUTPUT_PATH ||= :S3_HTML_OUTPUT_PATH
|
15
15
|
S3_VERSION_OUTPUT_PATH ||= :S3_VERSION_OUTPUT_PATH
|
16
|
+
S3_SOURCE_OUTPUT_PATH ||= :S3_SOURCE_OUTPUT_PATH
|
16
17
|
end
|
17
18
|
|
18
19
|
class AwsS3Action < Action
|
@@ -36,6 +37,7 @@ module Fastlane
|
|
36
37
|
params[:plist_file_name] = config[:plist_file_name]
|
37
38
|
params[:html_template_path] = config[:html_template_path]
|
38
39
|
params[:html_file_name] = config[:html_file_name]
|
40
|
+
params[:skip_html_upload] = config[:skip_html_upload]
|
39
41
|
params[:version_template_path] = config[:version_template_path]
|
40
42
|
params[:version_file_name] = config[:version_file_name]
|
41
43
|
|
@@ -144,10 +146,8 @@ module Fastlane
|
|
144
146
|
|
145
147
|
# Creates plist from template
|
146
148
|
if plist_template_path && File.exist?(plist_template_path)
|
147
|
-
puts "1 - #{plist_template_path}"
|
148
149
|
plist_template = eth.load_from_path(plist_template_path)
|
149
150
|
else
|
150
|
-
puts "2 - #{Helper.gem_path('fastlane-plugin-aws_s3')}"
|
151
151
|
plist_template = eth.load("s3_ios_plist_template")
|
152
152
|
end
|
153
153
|
plist_render = eth.render(plist_template, {
|
@@ -202,21 +202,26 @@ module Fastlane
|
|
202
202
|
# html uploading
|
203
203
|
#
|
204
204
|
#####################################
|
205
|
-
|
205
|
+
|
206
|
+
skip_html = params[:skip_html_upload]
|
207
|
+
|
208
|
+
html_url = self.upload_file(s3_client, s3_bucket, app_directory, html_file_name, html_render, acl) unless skip_html
|
206
209
|
version_url = self.upload_file(s3_client, s3_bucket, app_directory, version_file_name, version_render, acl)
|
207
210
|
|
208
211
|
# Setting action and environment variables
|
209
212
|
Actions.lane_context[SharedValues::S3_PLIST_OUTPUT_PATH] = plist_url
|
210
213
|
ENV[SharedValues::S3_PLIST_OUTPUT_PATH.to_s] = plist_url
|
211
214
|
|
212
|
-
Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_url
|
213
|
-
ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url
|
215
|
+
Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_url unless skip_html
|
216
|
+
ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url unless skip_html
|
214
217
|
|
215
218
|
Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH] = version_url
|
216
219
|
ENV[SharedValues::S3_VERSION_OUTPUT_PATH.to_s] = version_url
|
220
|
+
|
221
|
+
self.upload_source(s3_client, params, s3_bucket, params[:source], s3_path, acl)
|
217
222
|
|
218
223
|
UI.success("Successfully uploaded ipa file to '#{Actions.lane_context[SharedValues::S3_IPA_OUTPUT_PATH]}'")
|
219
|
-
UI.success("iOS app can be downloaded at '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'")
|
224
|
+
UI.success("iOS app can be downloaded at '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'") unless skip_html
|
220
225
|
end
|
221
226
|
|
222
227
|
def self.upload_apk(s3_client, params, s3_region, s3_access_key, s3_secret_access_key, s3_bucket, apk_file, s3_path, acl)
|
@@ -295,18 +300,47 @@ module Fastlane
|
|
295
300
|
# html and plist uploading
|
296
301
|
#
|
297
302
|
#####################################
|
303
|
+
|
304
|
+
skip_html = params[:skip_html_upload]
|
298
305
|
|
299
|
-
html_url = self.upload_file(s3_client, s3_bucket, app_directory, html_file_name, html_render, acl)
|
306
|
+
html_url = self.upload_file(s3_client, s3_bucket, app_directory, html_file_name, html_render, acl) unless skip_html
|
300
307
|
version_url = self.upload_file(s3_client, s3_bucket, app_directory, version_file_name, version_render, acl)
|
301
308
|
|
302
|
-
Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_url
|
303
|
-
ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url
|
309
|
+
Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH] = html_url unless skip_html
|
310
|
+
ENV[SharedValues::S3_HTML_OUTPUT_PATH.to_s] = html_url unless skip_html
|
304
311
|
|
305
312
|
Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH] = version_url
|
306
313
|
ENV[SharedValues::S3_VERSION_OUTPUT_PATH.to_s] = version_url
|
307
314
|
|
315
|
+
self.upload_source(s3_client, params, s3_bucket, params[:source], s3_path, acl)
|
316
|
+
|
308
317
|
UI.success("Successfully uploaded apk file to '#{Actions.lane_context[SharedValues::S3_APK_OUTPUT_PATH]}'")
|
309
|
-
UI.success("Android app can be downloaded at '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'")
|
318
|
+
UI.success("Android app can be downloaded at '#{Actions.lane_context[SharedValues::S3_HTML_OUTPUT_PATH]}'") unless skip_html
|
319
|
+
end
|
320
|
+
|
321
|
+
def self.upload_source(s3_client, params, s3_bucket, source_directory, s3_path, acl)
|
322
|
+
if source_directory && File.directory?(source_directory)
|
323
|
+
source_directory = File.absolute_path source_directory
|
324
|
+
output_file_path = Tempfile.new('aws_s3_source').path
|
325
|
+
|
326
|
+
output_file_path = other_action.zip(
|
327
|
+
path: source_directory,
|
328
|
+
output_path: output_file_path.gsub(/(?<!.zip)$/, ".zip")
|
329
|
+
)
|
330
|
+
|
331
|
+
s3_path = "#{version_code}_#{version_name}/" unless s3_path
|
332
|
+
app_directory = params[:app_directory]
|
333
|
+
url_part = s3_path
|
334
|
+
zip_file_name = "#{url_part}source.zip"
|
335
|
+
|
336
|
+
output_path_data = File.open("#{output_file_path}", 'rb')
|
337
|
+
source_url = self.upload_file(s3_client, s3_bucket, app_directory, zip_file_name, output_path_data, acl)
|
338
|
+
|
339
|
+
Actions.lane_context[SharedValues::S3_SOURCE_OUTPUT_PATH] = source_url
|
340
|
+
ENV[SharedValues::S3_SOURCE_OUTPUT_PATH.to_s] = source_url
|
341
|
+
|
342
|
+
UI.success("Source can be downloaded at '#{Actions.lane_context[SharedValues::S3_SOURCE_OUTPUT_PATH]}'")
|
343
|
+
end
|
310
344
|
end
|
311
345
|
|
312
346
|
def self.get_apk_version(apk_file)
|
@@ -438,6 +472,12 @@ module Fastlane
|
|
438
472
|
env_name: "",
|
439
473
|
description: "uploaded html filename",
|
440
474
|
optional: true),
|
475
|
+
FastlaneCore::ConfigItem.new(key: :skip_html_upload,
|
476
|
+
env_name: "",
|
477
|
+
description: "skip html upload if true",
|
478
|
+
optional: true,
|
479
|
+
default_value: false,
|
480
|
+
is_string: false),
|
441
481
|
FastlaneCore::ConfigItem.new(key: :version_template_path,
|
442
482
|
env_name: "",
|
443
483
|
description: "version erb template path",
|
@@ -499,7 +539,8 @@ module Fastlane
|
|
499
539
|
['S3_DSYM_OUTPUT_PATH', 'Direct HTTP link to the uploaded dsym file'],
|
500
540
|
['S3_PLIST_OUTPUT_PATH', 'Direct HTTP link to the uploaded plist file'],
|
501
541
|
['S3_HTML_OUTPUT_PATH', 'Direct HTTP link to the uploaded HTML file'],
|
502
|
-
['S3_VERSION_OUTPUT_PATH', 'Direct HTTP link to the uploaded Version file']
|
542
|
+
['S3_VERSION_OUTPUT_PATH', 'Direct HTTP link to the uploaded Version file'],
|
543
|
+
['S3_SOURCE_OUTPUT_PATH', 'Direct HTTP link to the uploaded source ']
|
503
544
|
]
|
504
545
|
end
|
505
546
|
|
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.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Holtz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -111,7 +111,6 @@ files:
|
|
111
111
|
- lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb
|
112
112
|
- lib/fastlane/plugin/aws_s3/helper/aws_s3_helper.rb
|
113
113
|
- lib/fastlane/plugin/aws_s3/version.rb
|
114
|
-
- lib/fastlane/plugin/s3/version.rb
|
115
114
|
homepage: https://github.com/joshdholtz/fastlane-plugin-s3
|
116
115
|
licenses:
|
117
116
|
- MIT
|