fastlane-plugin-waldo 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -6
- data/lib/fastlane/plugin/waldo/actions/waldo_action.rb +17 -3
- data/lib/fastlane/plugin/waldo/helper/waldo_helper.rb +15 -2
- data/lib/fastlane/plugin/waldo/version.rb +1 -1
- metadata +10 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f32ec479ee63b1ab4f8927cb26ee7b49562c5ea8
|
4
|
+
data.tar.gz: 42c8849320d5ff492788e542866c71b45a9b3773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49ea9aef680aa191a35d3b3a6a0bdf2f9ce809ffc4ce69e373e2b0d8ca2462547b1a806a92ca0669528a3c9ff4c565251f81d688ebb8c1ec6592339368d0a361
|
7
|
+
data.tar.gz: 2bd510d3f86f923f9ac982b26e90032e678f4aaed3bff69f4f9413c3f628cdaca7c2c4898224dbaf0cf31382d23465b482b9097637354b8a17465537f79762e4
|
data/README.md
CHANGED
@@ -22,26 +22,56 @@ which allows you to upload an iOS or Android build to Waldo for processing.
|
|
22
22
|
To get started, first obtain an upload token from Waldo for your app. These are
|
23
23
|
used to authenticate with the Waldo backend on each call.
|
24
24
|
|
25
|
-
### Uploading an iOS Build
|
25
|
+
### Uploading an iOS Device Build
|
26
26
|
|
27
27
|
Build a new IPA for your app. If you use `gym` (aka `build_ios_app`) to build
|
28
28
|
your IPA, `waldo` will automatically find and upload the generated IPA.
|
29
29
|
|
30
30
|
```ruby
|
31
|
-
gym
|
31
|
+
gym(export_method: 'development') # or 'ad-hoc'
|
32
32
|
waldo(upload_token: '0123456789abcdef0123456789abcdef')
|
33
33
|
```
|
34
34
|
|
35
35
|
> **Note:** You _must_ specify the Waldo upload token.
|
36
36
|
|
37
|
-
If
|
38
|
-
|
37
|
+
If you do _not_ use `gym` to build your IPA, you will need to explicitly
|
38
|
+
specify the IPA path to `waldo`:
|
39
39
|
|
40
40
|
```ruby
|
41
41
|
waldo(ipa_path: '/path/to/YourApp.ipa',
|
42
42
|
upload_token: '0123456789abcdef0123456789abcdef')
|
43
43
|
```
|
44
44
|
|
45
|
+
### Uploading an iOS Simulator Build
|
46
|
+
|
47
|
+
Create a new simulator build for your app.
|
48
|
+
|
49
|
+
You can use `gym` (aka `build_ios_app`) to build your app provided that you
|
50
|
+
supply several parameters in order to convince Xcode to _both_ build for the
|
51
|
+
simulator _and_ not attempt to generate an IPA:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
gym(configuration: 'Release',
|
55
|
+
derived_data_path: '/path/to/derivedData',
|
56
|
+
skip_package_ipa: true,
|
57
|
+
skip_archive: true,
|
58
|
+
destination: 'generic/platform=iOS Simulator')
|
59
|
+
```
|
60
|
+
|
61
|
+
You can then find your app relative to the derived data path in the
|
62
|
+
`./Build/Products/Release-iphonesimulator` directory.
|
63
|
+
|
64
|
+
Regardless of how you create the actual simulator build for your app, the
|
65
|
+
upload itself is very simple:
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
waldo(app_path: '/path/to/YourApp.app',
|
69
|
+
upload_token: '0123456789abcdef0123456789abcdef')
|
70
|
+
```
|
71
|
+
|
72
|
+
> **Note:** You _must_ specify _both_ the path of the `.app` _and_ the Waldo
|
73
|
+
> upload token.
|
74
|
+
|
45
75
|
### Uploading an Android Build
|
46
76
|
|
47
77
|
Build a new APK for your app. If you use `gradle` to build your APK, `waldo`
|
@@ -55,8 +85,8 @@ waldo(upload_token: '0123456789abcdef0123456789abcdef')
|
|
55
85
|
|
56
86
|
> **Note:** You _must_ specify the Waldo upload token.
|
57
87
|
|
58
|
-
If
|
59
|
-
|
88
|
+
If you do _not_ use `gradle` to build your APK, you will need to explicitly
|
89
|
+
specify the APK path to `waldo`:
|
60
90
|
|
61
91
|
```ruby
|
62
92
|
waldo(apk_path: '/path/to/YourApp.apk',
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
if platform == :android
|
10
10
|
UI.error("You must pass an APK path to the Waldo action") and return unless params[:apk_path]
|
11
11
|
elsif platform == :ios || platform.nil?
|
12
|
-
UI.error("You must pass an IPA path to the Waldo action") and return unless params[:ipa_path]
|
12
|
+
UI.error("You must pass an IPA or app path to the Waldo action") and return unless params[:ipa_path] || params[:app_path]
|
13
13
|
end
|
14
14
|
|
15
15
|
UI.error("You must pass an upload token to the Waldo action") and return unless params[:upload_token]
|
@@ -30,14 +30,24 @@ module Fastlane
|
|
30
30
|
if platform == :android
|
31
31
|
apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "app-release.apk")].last
|
32
32
|
elsif platform == :ios || platform.nil?
|
33
|
+
app_path_default = Dir["*.app"].sort_by { |x| File.mtime(x) }.last
|
33
34
|
ipa_path_default = Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last
|
34
35
|
end
|
35
36
|
|
36
37
|
[
|
37
38
|
# iOS-specific
|
39
|
+
FastlaneCore::ConfigItem.new(key: :app_path,
|
40
|
+
env_name: "WALDO_APP_PATH",
|
41
|
+
description: "Path to your app file",
|
42
|
+
default_value: app_path_default,
|
43
|
+
default_value_dynamic: true,
|
44
|
+
optional: true,
|
45
|
+
verify_block: proc do |value|
|
46
|
+
UI.error("Unable to find app file at path '#{value.to_s}'") unless File.exist?(value)
|
47
|
+
end),
|
38
48
|
FastlaneCore::ConfigItem.new(key: :ipa_path,
|
39
49
|
env_name: "WALDO_IPA_PATH",
|
40
|
-
description: "Path to your IPA file
|
50
|
+
description: "Path to your IPA file (optional if you use the _gym_ or _xcodebuild_ action)",
|
41
51
|
default_value: Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH] || ipa_path_default,
|
42
52
|
default_value_dynamic: true,
|
43
53
|
optional: true,
|
@@ -47,7 +57,7 @@ module Fastlane
|
|
47
57
|
# Android-specific
|
48
58
|
FastlaneCore::ConfigItem.new(key: :apk_path,
|
49
59
|
env_name: "WALDO_APK_PATH",
|
50
|
-
description: "Path to your APK file
|
60
|
+
description: "Path to your APK file (optional if you use the _gradle_ action)",
|
51
61
|
default_value: Actions.lane_context[Actions::SharedValues::GRADLE_APK_OUTPUT_PATH] || apk_path_default,
|
52
62
|
default_value_dynamic: true,
|
53
63
|
optional: true,
|
@@ -95,6 +105,10 @@ module Fastlane
|
|
95
105
|
'waldo(
|
96
106
|
ipa_path: "./YourApp.ipa",
|
97
107
|
upload_token: "..."
|
108
|
+
)',
|
109
|
+
'waldo(
|
110
|
+
app_path: "./YourApp.app",
|
111
|
+
upload_token: "..."
|
98
112
|
)'
|
99
113
|
]
|
100
114
|
end
|
@@ -39,7 +39,15 @@ module Fastlane
|
|
39
39
|
body_path = params[:apk_path]
|
40
40
|
flavor = "Android"
|
41
41
|
elsif platform == :ios || platform.nil?
|
42
|
-
|
42
|
+
if params[:app_path]
|
43
|
+
app_dir_path = File.dirname(params[:app_path])
|
44
|
+
app_name = File.basename(params[:app_path])
|
45
|
+
body_path = File.join(Dir.tmpdir, "#{app_name}.zip")
|
46
|
+
|
47
|
+
Actions.sh(%(cd "#{app_dir_path}" && zip -qry "#{body_path}" "#{app_name}"))
|
48
|
+
else
|
49
|
+
body_path = params[:ipa_path]
|
50
|
+
end
|
43
51
|
flavor = "iOS"
|
44
52
|
end
|
45
53
|
|
@@ -50,7 +58,12 @@ module Fastlane
|
|
50
58
|
request['User-Agent'] = "Waldo fastlane/#{flavor} v#{Fastlane::Waldo::VERSION}"
|
51
59
|
|
52
60
|
request.body_stream = WaldoReadIO.new(body_path)
|
53
|
-
|
61
|
+
|
62
|
+
if params[:app_path]
|
63
|
+
request.content_type = 'application/zip'
|
64
|
+
else
|
65
|
+
request.content_type = 'application/octet-stream'
|
66
|
+
end
|
54
67
|
|
55
68
|
request
|
56
69
|
end
|
metadata
CHANGED
@@ -1,95 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-waldo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- J. G. Pusey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.1'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0
|
19
|
+
version: '0'
|
23
20
|
type: :development
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.1'
|
30
24
|
- - ">="
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0
|
26
|
+
version: '0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: fastlane
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '2.95'
|
40
31
|
- - ">="
|
41
32
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
33
|
+
version: '0'
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '2.95'
|
50
38
|
- - ">="
|
51
39
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
40
|
+
version: '0'
|
53
41
|
- !ruby/object:Gem::Dependency
|
54
42
|
name: pry
|
55
43
|
requirement: !ruby/object:Gem::Requirement
|
56
44
|
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '0.1'
|
60
45
|
- - ">="
|
61
46
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0
|
47
|
+
version: '0'
|
63
48
|
type: :development
|
64
49
|
prerelease: false
|
65
50
|
version_requirements: !ruby/object:Gem::Requirement
|
66
51
|
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0.1'
|
70
52
|
- - ">="
|
71
53
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0
|
54
|
+
version: '0'
|
73
55
|
- !ruby/object:Gem::Dependency
|
74
56
|
name: rspec
|
75
57
|
requirement: !ruby/object:Gem::Requirement
|
76
58
|
requirements:
|
77
|
-
- - "~>"
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '1.0'
|
80
59
|
- - ">="
|
81
60
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
61
|
+
version: '0'
|
83
62
|
type: :development
|
84
63
|
prerelease: false
|
85
64
|
version_requirements: !ruby/object:Gem::Requirement
|
86
65
|
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.0'
|
90
66
|
- - ">="
|
91
67
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
68
|
+
version: '0'
|
93
69
|
description:
|
94
70
|
email: john@waldo.io
|
95
71
|
executables: []
|