fastlane-plugin-waldo 3.1.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +0 -21
- data/lib/fastlane/plugin/waldo/actions/waldo_action.rb +0 -10
- data/lib/fastlane/plugin/waldo/helper/waldo_helper.rb +31 -35
- data/lib/fastlane/plugin/waldo/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a207f81867b5afd0d775f89c1163c9358959f1f592483ad831fec7feab20c4
|
4
|
+
data.tar.gz: 81d52d2dd53e75eda4a4cbb13eb1489b6354acdee33f267133d5ffcac2eda74c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b14f679bfd115f896155351731c64711c697f0eb08b16dd878baaeb1ee2edb5107958c65bf443edfa36569fc7bfe75eeeb62f9c5a4a9c76cc275430d62925b0a
|
7
|
+
data.tar.gz: 239ab8f569a592c3d891f2f79319a9bb86d0e461edfd03c05eaeaafc317e28b5db858ebde2d4800f33aad04705212b867c9eb55ad1234b388dc67f3ff8166be9
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -59,27 +59,6 @@ waldo(upload_token: '0123456789abcdef0123456789abcdef',
|
|
59
59
|
> **Note:** You _must_ specify _both_ the Waldo upload token _and_ the path of
|
60
60
|
> the `.app`.
|
61
61
|
|
62
|
-
### Uploading an iOS Device Build
|
63
|
-
|
64
|
-
Build a new IPA for your app. If you use `gym` (aka `build_ios_app`) to build
|
65
|
-
your IPA, `waldo` will automatically find and upload the generated IPA.
|
66
|
-
|
67
|
-
```ruby
|
68
|
-
gym(export_method: 'ad-hoc') # or 'development'
|
69
|
-
|
70
|
-
waldo(upload_token: '0123456789abcdef0123456789abcdef')
|
71
|
-
```
|
72
|
-
|
73
|
-
> **Note:** You _must_ specify the Waldo upload token.
|
74
|
-
|
75
|
-
If you do _not_ use `gym` to build your IPA, you will need to explicitly
|
76
|
-
specify the IPA path to `waldo`:
|
77
|
-
|
78
|
-
```ruby
|
79
|
-
waldo(upload_token: '0123456789abcdef0123456789abcdef',
|
80
|
-
ipa_path: '/path/to/YourApp.ipa')
|
81
|
-
```
|
82
|
-
|
83
62
|
### Uploading an Android Build
|
84
63
|
|
85
64
|
Build a new APK for your app. If you use `gradle` to build your APK, `waldo`
|
@@ -21,12 +21,6 @@ module Fastlane
|
|
21
21
|
env_name: 'WALDO_APP_PATH',
|
22
22
|
description: 'Path to your app file',
|
23
23
|
optional: true),
|
24
|
-
FastlaneCore::ConfigItem.new(key: :ipa_path,
|
25
|
-
env_name: 'WALDO_IPA_PATH',
|
26
|
-
description: 'Path to your IPA file (optional if you use the _gym_ or _xcodebuild_ action)',
|
27
|
-
default_value: Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH],
|
28
|
-
default_value_dynamic: true,
|
29
|
-
optional: true),
|
30
24
|
# Android-specific
|
31
25
|
FastlaneCore::ConfigItem.new(key: :apk_path,
|
32
26
|
env_name: 'WALDO_APK_PATH',
|
@@ -73,10 +67,6 @@ module Fastlane
|
|
73
67
|
apk_path: './YourApp.apk',
|
74
68
|
upload_token: '...'
|
75
69
|
)",
|
76
|
-
"waldo(
|
77
|
-
ipa_path: './YourApp.ipa',
|
78
|
-
upload_token: '...'
|
79
|
-
)",
|
80
70
|
"waldo(
|
81
71
|
app_path: './YourApp.app',
|
82
72
|
upload_token: '...'
|
@@ -27,10 +27,10 @@ module Fastlane
|
|
27
27
|
UI.error("Unsupported platform: #{platform}")
|
28
28
|
end
|
29
29
|
|
30
|
-
"waldo-#{os}-#{arch}#{ext}"
|
30
|
+
"waldo-agent-#{os}-#{arch}#{ext}"
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.download(uri, path)
|
33
|
+
def self.download(uri, path, retryAllowed)
|
34
34
|
begin
|
35
35
|
request_uri = uri.request_uri
|
36
36
|
response = nil
|
@@ -43,26 +43,46 @@ module Fastlane
|
|
43
43
|
uri = URI.parse(response['location'])
|
44
44
|
end
|
45
45
|
|
46
|
+
code = response.code.to_i
|
47
|
+
|
48
|
+
if code < 200 || code > 299
|
49
|
+
UI.error("Unable to download #{request_uri}, HTTP status: #{response.code}")
|
50
|
+
|
51
|
+
return retryAllowed && shouldRetry?(response)
|
52
|
+
end
|
53
|
+
|
46
54
|
fp = File.open(path, 'wb')
|
47
55
|
|
48
56
|
fp.write(response.body)
|
49
57
|
rescue => exc
|
50
58
|
UI.error("Unable to download #{request_uri}: #{exc.inspect.to_s}")
|
59
|
+
|
60
|
+
return retryAllowed
|
51
61
|
ensure
|
52
62
|
fp.close if fp
|
53
63
|
end
|
64
|
+
|
65
|
+
return false
|
54
66
|
end
|
55
67
|
|
56
68
|
def self.download_binary
|
57
69
|
asset_name = determine_asset_name
|
58
70
|
|
59
|
-
uri_string = 'https://github.com/waldoapp/waldo-go-
|
71
|
+
uri_string = 'https://github.com/waldoapp/waldo-go-agent/releases/latest/download/'
|
60
72
|
|
61
73
|
uri_string += asset_name
|
62
74
|
|
63
|
-
binary_path = File.join(Dir.tmpdir, 'waldo')
|
75
|
+
binary_path = File.join(Dir.tmpdir, 'waldo-agent')
|
64
76
|
|
65
|
-
|
77
|
+
maxDownloadAttempts = 2
|
78
|
+
|
79
|
+
for attempts in 1..maxDownloadAttempts do
|
80
|
+
doRetry = download(URI(uri_string), binary_path, attempts < maxDownloadAttempts)
|
81
|
+
|
82
|
+
break unless doRetry
|
83
|
+
|
84
|
+
UI.message("Failed download attempts: #{attempts} -- retrying…")
|
85
|
+
end
|
66
86
|
|
67
87
|
File.chmod(0755, binary_path)
|
68
88
|
|
@@ -76,39 +96,14 @@ module Fastlane
|
|
76
96
|
app_path = in_params[:app_path]
|
77
97
|
git_branch = in_params[:git_branch]
|
78
98
|
git_commit = in_params[:git_commit]
|
79
|
-
ipa_path = in_params[:ipa_path]
|
80
99
|
upload_token = in_params[:upload_token]
|
81
100
|
variant_name = in_params[:variant_name] || Actions.lane_context[Actions::SharedValues::GRADLE_BUILD_TYPE]
|
82
101
|
|
83
102
|
apk_path.gsub!('\\ ', ' ') if apk_path
|
84
103
|
app_path.gsub!('\\ ', ' ') if app_path
|
85
|
-
ipa_path.gsub!('\\ ', ' ') if ipa_path
|
86
104
|
|
87
105
|
out_params[:apk_path] = apk_path if apk_path
|
88
|
-
|
89
|
-
if app_path && ipa_path
|
90
|
-
if !File.exist?(app_path)
|
91
|
-
out_params[:ipa_path] = ipa_path
|
92
|
-
|
93
|
-
app_path = nil
|
94
|
-
elsif !File.exist?(ipa_path)
|
95
|
-
out_params[:app_path] = app_path
|
96
|
-
|
97
|
-
ipa_path = nil
|
98
|
-
elsif File.mtime(app_path) < File.mtime(ipa_path)
|
99
|
-
out_params[:ipa_path] = ipa_path
|
100
|
-
|
101
|
-
app_path = nil
|
102
|
-
else
|
103
|
-
out_params[:app_path] = app_path
|
104
|
-
|
105
|
-
ipa_path = nil
|
106
|
-
end
|
107
|
-
else
|
108
|
-
out_params[:app_path] = app_path if app_path
|
109
|
-
out_params[:ipa_path] = ipa_path if ipa_path
|
110
|
-
end
|
111
|
-
|
106
|
+
out_params[:app_path] = app_path if app_path
|
112
107
|
out_params[:git_branch] = git_branch if git_branch
|
113
108
|
out_params[:git_commit] = git_commit if git_commit
|
114
109
|
out_params[:upload_token] = upload_token if upload_token
|
@@ -117,24 +112,25 @@ module Fastlane
|
|
117
112
|
out_params
|
118
113
|
end
|
119
114
|
|
115
|
+
def self.shouldRetry?(response)
|
116
|
+
[408, 429, 500, 502, 503, 504].include?(response.code.to_i)
|
117
|
+
end
|
118
|
+
|
120
119
|
def self.upload_build(params)
|
121
120
|
apk_path = params[:apk_path]
|
122
121
|
app_path = params[:app_path]
|
123
|
-
ipa_path = params[:ipa_path]
|
124
122
|
|
125
123
|
if apk_path
|
126
124
|
build_path = apk_path
|
127
125
|
elsif app_path
|
128
126
|
build_path = app_path
|
129
|
-
elsif ipa_path
|
130
|
-
build_path = ipa_path
|
131
127
|
else
|
132
128
|
build_path = ''
|
133
129
|
end
|
134
130
|
|
135
131
|
command = []
|
136
132
|
|
137
|
-
command << "WALDO_WRAPPER_NAME_OVERRIDE='Fastlane'"
|
133
|
+
command << "WALDO_WRAPPER_NAME_OVERRIDE='Waldo Fastlane Plugin'"
|
138
134
|
command << "WALDO_WRAPPER_VERSION_OVERRIDE='#{Fastlane::Waldo::VERSION}'"
|
139
135
|
|
140
136
|
command << download_binary.shellescape
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-waldo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Pusey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description:
|
70
|
-
email: john@waldo.
|
70
|
+
email: john@waldo.com
|
71
71
|
executables: []
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
100
|
+
rubygems_version: 3.1.6
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: Upload build to Waldo
|