fastlane-plugin-waldo 3.0.1 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/waldo/helper/waldo_helper.rb +74 -35
- data/lib/fastlane/plugin/waldo/version.rb +1 -1
- metadata +7 -13
- data/lib/fastlane/plugin/waldo/assets/waldo-linux-arm64 +0 -0
- data/lib/fastlane/plugin/waldo/assets/waldo-linux-x86_64 +0 -0
- data/lib/fastlane/plugin/waldo/assets/waldo-macos-arm64 +0 -0
- data/lib/fastlane/plugin/waldo/assets/waldo-macos-x86_64 +0 -0
- data/lib/fastlane/plugin/waldo/assets/waldo-windows-arm64.exe +0 -0
- data/lib/fastlane/plugin/waldo/assets/waldo-windows-x86_64.exe +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1dc057170631344e00479670d7a24783fb646ed259d6c3dd24c70b03a0778f
|
4
|
+
data.tar.gz: e7cf97ce2e4ab0035ef472eb0c4e9eb28146afcfe421810101cf4e73972e646d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 450c1adf34a74785d8e13db163a59f5e806e6d3eb2e8779a83e19e78e61a15d41ef80b20270da18ce2041befe304a0d4ac23062ee3a16c4c1bc9639adcac2a08
|
7
|
+
data.tar.gz: 705cc3019a2dfcb221b0d1084a7a1c30014bbafceb534532d806b8badb6a12cba6395076d84cc4aad276bfd44ee1907f5d149b069636185f6c6a584863b8d057
|
@@ -1,6 +1,74 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Helper
|
3
3
|
class WaldoHelper
|
4
|
+
require 'net/http'
|
5
|
+
|
6
|
+
def self.determine_asset_name
|
7
|
+
platform = RUBY_PLATFORM.downcase
|
8
|
+
|
9
|
+
if platform.include?('linux')
|
10
|
+
ext = ''
|
11
|
+
os = 'linux'
|
12
|
+
elsif platform.include?('darwin')
|
13
|
+
ext = ''
|
14
|
+
os = 'macos'
|
15
|
+
elsif platform.include?('mswin')
|
16
|
+
ext = '.exe'
|
17
|
+
os = 'windows'
|
18
|
+
else
|
19
|
+
UI.error("Unsupported platform: #{platform}")
|
20
|
+
end
|
21
|
+
|
22
|
+
if platform.include?('arm64')
|
23
|
+
arch = 'arm64'
|
24
|
+
elsif platform.include?('x86_64')
|
25
|
+
arch = 'x86_64'
|
26
|
+
else
|
27
|
+
UI.error("Unsupported platform: #{platform}")
|
28
|
+
end
|
29
|
+
|
30
|
+
"waldo-#{os}-#{arch}#{ext}"
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.download(uri, path)
|
34
|
+
begin
|
35
|
+
request_uri = uri.request_uri
|
36
|
+
response = nil
|
37
|
+
|
38
|
+
loop do
|
39
|
+
response = Net::HTTP.get_response(uri)
|
40
|
+
|
41
|
+
break unless response.is_a?(Net::HTTPRedirection)
|
42
|
+
|
43
|
+
uri = URI.parse(response['location'])
|
44
|
+
end
|
45
|
+
|
46
|
+
fp = File.open(path, 'wb')
|
47
|
+
|
48
|
+
fp.write(response.body)
|
49
|
+
rescue => exc
|
50
|
+
UI.error("Unable to download #{request_uri}: #{exc.inspect.to_s}")
|
51
|
+
ensure
|
52
|
+
fp.close if fp
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.download_binary
|
57
|
+
asset_name = determine_asset_name
|
58
|
+
|
59
|
+
uri_string = 'https://github.com/waldoapp/waldo-go-cli/releases/latest/download/'
|
60
|
+
|
61
|
+
uri_string += asset_name
|
62
|
+
|
63
|
+
binary_path = File.join(Dir.tmpdir, 'waldo')
|
64
|
+
|
65
|
+
download(URI(uri_string), binary_path)
|
66
|
+
|
67
|
+
File.chmod(0755, binary_path)
|
68
|
+
|
69
|
+
binary_path
|
70
|
+
end
|
71
|
+
|
4
72
|
def self.filter_parameters(in_params)
|
5
73
|
out_params = {}
|
6
74
|
|
@@ -12,9 +80,9 @@ module Fastlane
|
|
12
80
|
upload_token = in_params[:upload_token]
|
13
81
|
variant_name = in_params[:variant_name] || Actions.lane_context[Actions::SharedValues::GRADLE_BUILD_TYPE]
|
14
82
|
|
15
|
-
apk_path.gsub!(
|
16
|
-
app_path.gsub!(
|
17
|
-
ipa_path.gsub!(
|
83
|
+
apk_path.gsub!('\\ ', ' ') if apk_path
|
84
|
+
app_path.gsub!('\\ ', ' ') if app_path
|
85
|
+
ipa_path.gsub!('\\ ', ' ') if ipa_path
|
18
86
|
|
19
87
|
out_params[:apk_path] = apk_path if apk_path
|
20
88
|
|
@@ -49,35 +117,6 @@ module Fastlane
|
|
49
117
|
out_params
|
50
118
|
end
|
51
119
|
|
52
|
-
def self.get_binary_path
|
53
|
-
platform = RUBY_PLATFORM.downcase
|
54
|
-
|
55
|
-
if platform.include?("linux")
|
56
|
-
ext = ""
|
57
|
-
os = "linux"
|
58
|
-
elsif platform.include?("darwin")
|
59
|
-
ext = ""
|
60
|
-
os = "macos"
|
61
|
-
elsif platform.include?("mswin")
|
62
|
-
ext = ".exe"
|
63
|
-
os = "windows"
|
64
|
-
else
|
65
|
-
UI.error("Unsupported platform: #{platform}")
|
66
|
-
end
|
67
|
-
|
68
|
-
if platform.include?("arm64")
|
69
|
-
arch = "arm64"
|
70
|
-
elsif platform.include?("x86_64")
|
71
|
-
arch = "x86_64"
|
72
|
-
else
|
73
|
-
UI.error("Unsupported platform: #{platform}")
|
74
|
-
end
|
75
|
-
|
76
|
-
root = Pathname.new(File.expand_path('../../..', __FILE__))
|
77
|
-
|
78
|
-
File.join(root, "waldo", "assets", "waldo-#{os}-#{arch}#{ext}")
|
79
|
-
end
|
80
|
-
|
81
120
|
def self.upload_build(params)
|
82
121
|
apk_path = params[:apk_path]
|
83
122
|
app_path = params[:app_path]
|
@@ -90,7 +129,7 @@ module Fastlane
|
|
90
129
|
elsif ipa_path
|
91
130
|
build_path = ipa_path
|
92
131
|
else
|
93
|
-
build_path =
|
132
|
+
build_path = ''
|
94
133
|
end
|
95
134
|
|
96
135
|
command = []
|
@@ -98,8 +137,8 @@ module Fastlane
|
|
98
137
|
command << "WALDO_WRAPPER_NAME_OVERRIDE='Fastlane'"
|
99
138
|
command << "WALDO_WRAPPER_VERSION_OVERRIDE='#{Fastlane::Waldo::VERSION}'"
|
100
139
|
|
101
|
-
command <<
|
102
|
-
command <<
|
140
|
+
command << download_binary.shellescape
|
141
|
+
command << 'upload'
|
103
142
|
|
104
143
|
if params[:git_branch]
|
105
144
|
command << '--git_branch'
|
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.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Pusey
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email: john@waldo.io
|
71
71
|
executables: []
|
72
72
|
extensions: []
|
@@ -76,19 +76,13 @@ files:
|
|
76
76
|
- README.md
|
77
77
|
- lib/fastlane/plugin/waldo.rb
|
78
78
|
- lib/fastlane/plugin/waldo/actions/waldo_action.rb
|
79
|
-
- lib/fastlane/plugin/waldo/assets/waldo-linux-arm64
|
80
|
-
- lib/fastlane/plugin/waldo/assets/waldo-linux-x86_64
|
81
|
-
- lib/fastlane/plugin/waldo/assets/waldo-macos-arm64
|
82
|
-
- lib/fastlane/plugin/waldo/assets/waldo-macos-x86_64
|
83
|
-
- lib/fastlane/plugin/waldo/assets/waldo-windows-arm64.exe
|
84
|
-
- lib/fastlane/plugin/waldo/assets/waldo-windows-x86_64.exe
|
85
79
|
- lib/fastlane/plugin/waldo/helper/waldo_helper.rb
|
86
80
|
- lib/fastlane/plugin/waldo/version.rb
|
87
81
|
homepage: https://github.com/waldoapp/fastlane-plugin-waldo
|
88
82
|
licenses:
|
89
83
|
- MIT
|
90
84
|
metadata: {}
|
91
|
-
post_install_message:
|
85
|
+
post_install_message:
|
92
86
|
rdoc_options: []
|
93
87
|
require_paths:
|
94
88
|
- lib
|
@@ -103,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
97
|
- !ruby/object:Gem::Version
|
104
98
|
version: '0'
|
105
99
|
requirements: []
|
106
|
-
rubygems_version: 3.0.3
|
107
|
-
signing_key:
|
100
|
+
rubygems_version: 3.0.3.1
|
101
|
+
signing_key:
|
108
102
|
specification_version: 4
|
109
103
|
summary: Upload build to Waldo
|
110
104
|
test_files: []
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|