fastlane-plugin-bugsnag 1.3.0 → 1.3.1
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 +4 -4
- data/lib/fastlane/plugin/bugsnag/actions/send_build_to_bugsnag.rb +16 -5
- data/lib/fastlane/plugin/bugsnag/version.rb +1 -1
- data/spec/bugsnag_upload_dsym_action_spec.rb +0 -2
- data/spec/fixtures/ios_proj/FirstRealFolder/Info.plist +49 -0
- data/spec/fixtures/ios_proj/Project/Info.plist +48 -0
- data/spec/fixtures/ios_proj/aaTests/Info.plist +48 -0
- data/spec/send_build_to_bugsnag_spec.rb +109 -0
- data/spec/spec_helper.rb +2 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7020860789186a1fc8fb21cd6349d633a6f2a76
|
4
|
+
data.tar.gz: 758c188397d02a429660e287c6f35084fd409190
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f0114205b5435acea7e400e292af32a941cd5f0ba9cac57216fa7a5ff12348a653e5708606409c55acd05e6c33efc4cfe254abb627e474c5b22face56a6e5cc
|
7
|
+
data.tar.gz: 1743c54c23cd198b7f4ed73787dd37d66bfb042c3e063acfae5936a4ea24af5ac7091a27275a17aa4706d3253d76bc828e1e0c15abae6553a4cb0d0d81e5dd92
|
@@ -14,14 +14,25 @@ module Fastlane
|
|
14
14
|
else
|
15
15
|
payload.merge!(options_from_info_plist(params[:config_file])) if params[:config_file]
|
16
16
|
end
|
17
|
+
|
18
|
+
default_plist = default_info_plist_path
|
19
|
+
default_manifest = default_android_manifest_path
|
20
|
+
if (lane_context[:PLATFORM_NAME] == :android and params[:config_file] == default_manifest) or
|
21
|
+
(lane_context[:PLATFORM_NAME] != :android and params[:config_file] == default_plist)
|
22
|
+
# Load custom API key and version properties only if config file has not been overridden
|
23
|
+
payload[:apiKey] = params[:api_key] unless params[:api_key].nil?
|
24
|
+
payload[:appVersion] = params[:app_version] unless params[:app_version].nil?
|
25
|
+
payload[:appVersionCode] = params[:android_version_code] unless params[:android_version_code].nil?
|
26
|
+
payload[:appBundleVersion] = params[:ios_bundle_version] unless params[:ios_bundle_version].nil?
|
27
|
+
else
|
28
|
+
# Print which file is populating version and API key information since the value has been
|
29
|
+
# overridden
|
30
|
+
UI.message("Loading API key and app version info from #{params[:config_file]}")
|
31
|
+
end
|
17
32
|
payload.delete(:config_file)
|
18
33
|
|
19
34
|
# Overwrite automated options with configured if set
|
20
|
-
payload[:apiKey] = params[:api_key] unless params[:api_key].nil?
|
21
|
-
payload[:appVersion] = params[:app_version] unless params[:app_version].nil?
|
22
35
|
payload[:releaseStage] = params[:release_stage] unless params[:release_stage].nil?
|
23
|
-
payload[:appVersionCode] = params[:android_version_code] unless params[:android_version_code].nil?
|
24
|
-
payload[:appBundleVersion] = params[:ios_bundle_version] unless params[:ios_bundle_version].nil?
|
25
36
|
payload[:builderName] = params[:builder]
|
26
37
|
|
27
38
|
payload[:sourceControl][:revision] = params[:revision] if params[:revision]
|
@@ -199,7 +210,7 @@ module Fastlane
|
|
199
210
|
end
|
200
211
|
|
201
212
|
def self.default_info_plist_path
|
202
|
-
Dir.glob("./{ios/,}*/Info.plist").reject {|path| path
|
213
|
+
Dir.glob("./{ios/,}*/Info.plist").reject {|path| path =~ /build|test/i }.first
|
203
214
|
end
|
204
215
|
|
205
216
|
def self.options_from_info_plist file_path
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>BugsnagAPIKey</key>
|
6
|
+
<string>other-key</string>
|
7
|
+
<key>CFBundleDevelopmentRegion</key>
|
8
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
11
|
+
<key>CFBundleIdentifier</key>
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
+
<string>6.0</string>
|
15
|
+
<key>CFBundleName</key>
|
16
|
+
<string>$(PRODUCT_NAME)</string>
|
17
|
+
<key>CFBundlePackageType</key>
|
18
|
+
<string>APPL</string>
|
19
|
+
<key>CFBundleShortVersionString</key>
|
20
|
+
<string>3.0-other</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>56</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
40
|
+
<array>
|
41
|
+
<string>UIInterfaceOrientationPortrait</string>
|
42
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
43
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
44
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
45
|
+
</array>
|
46
|
+
</dict>
|
47
|
+
</plist>
|
48
|
+
|
49
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>BugsnagAPIKey</key>
|
6
|
+
<string>project-key</string>
|
7
|
+
<key>CFBundleDevelopmentRegion</key>
|
8
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
11
|
+
<key>CFBundleIdentifier</key>
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
+
<string>6.0</string>
|
15
|
+
<key>CFBundleName</key>
|
16
|
+
<string>$(PRODUCT_NAME)</string>
|
17
|
+
<key>CFBundlePackageType</key>
|
18
|
+
<string>APPL</string>
|
19
|
+
<key>CFBundleShortVersionString</key>
|
20
|
+
<string>2.0-project</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>6</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
40
|
+
<array>
|
41
|
+
<string>UIInterfaceOrientationPortrait</string>
|
42
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
43
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
44
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
45
|
+
</array>
|
46
|
+
</dict>
|
47
|
+
</plist>
|
48
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>BugsnagAPIKey</key>
|
6
|
+
<string>test-key</string>
|
7
|
+
<key>CFBundleDevelopmentRegion</key>
|
8
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
11
|
+
<key>CFBundleIdentifier</key>
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
+
<string>6.0</string>
|
15
|
+
<key>CFBundleName</key>
|
16
|
+
<string>$(PRODUCT_NAME)</string>
|
17
|
+
<key>CFBundlePackageType</key>
|
18
|
+
<string>APPL</string>
|
19
|
+
<key>CFBundleShortVersionString</key>
|
20
|
+
<string>1.0</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
40
|
+
<array>
|
41
|
+
<string>UIInterfaceOrientationPortrait</string>
|
42
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
43
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
44
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
45
|
+
</array>
|
46
|
+
</dict>
|
47
|
+
</plist>
|
48
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
require 'fastlane/actions/get_info_plist_value'
|
4
|
+
|
5
|
+
BuildAction = Fastlane::Actions::SendBuildToBugsnagAction
|
6
|
+
|
7
|
+
describe BuildAction do
|
8
|
+
def load_default_opts
|
9
|
+
BuildAction.available_options.map do |x|
|
10
|
+
[x.key, x.default_value]
|
11
|
+
end.to_h
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'building an iOS project' do
|
15
|
+
it 'detects default Info.plist file excluding test dirs' do
|
16
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
17
|
+
payload = ::JSON.load(body)
|
18
|
+
expect(payload['appVersion']).to eq '3.0-other'
|
19
|
+
expect(payload['appBundleVersion']).to eq '56'
|
20
|
+
expect(payload['apiKey']).to eq 'other-key'
|
21
|
+
end
|
22
|
+
|
23
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
24
|
+
BuildAction.run(load_default_opts)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'using default config_file option' do
|
29
|
+
context 'override API key option' do
|
30
|
+
it 'reads API key from the api_key option' do
|
31
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
32
|
+
payload = ::JSON.load(body)
|
33
|
+
expect(payload['apiKey']).to eq 'baobab'
|
34
|
+
end
|
35
|
+
|
36
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
37
|
+
BuildAction.run(load_default_opts.merge({
|
38
|
+
api_key: 'baobab'
|
39
|
+
}))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'reads version info from the config file' do
|
44
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
45
|
+
payload = ::JSON.load(body)
|
46
|
+
expect(payload['appVersion']).to eq '4.0.0'
|
47
|
+
expect(payload['appBundleVersion']).to eq '400'
|
48
|
+
end
|
49
|
+
|
50
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
51
|
+
BuildAction.run(load_default_opts.merge({
|
52
|
+
app_version: '4.0.0',
|
53
|
+
ios_bundle_version: '400'
|
54
|
+
}))
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'override config_file option' do
|
61
|
+
it 'reads API key and version info from the config file' do
|
62
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
63
|
+
payload = ::JSON.load(body)
|
64
|
+
expect(payload['appVersion']).to eq '2.0-project'
|
65
|
+
expect(payload['appBundleVersion']).to eq '6'
|
66
|
+
expect(payload['apiKey']).to eq 'project-key'
|
67
|
+
end
|
68
|
+
|
69
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
70
|
+
BuildAction.run(load_default_opts.merge({
|
71
|
+
config_file: File.join('Project', 'Info.plist')
|
72
|
+
}))
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context 'override API key option' do
|
77
|
+
it 'reads API key from the config file' do
|
78
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
79
|
+
payload = ::JSON.load(body)
|
80
|
+
expect(payload['apiKey']).to eq 'project-key'
|
81
|
+
end
|
82
|
+
|
83
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
84
|
+
BuildAction.run(load_default_opts.merge({
|
85
|
+
config_file: File.join('Project', 'Info.plist'),
|
86
|
+
api_key: 'baobab'
|
87
|
+
}))
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'reads version info from the config file' do
|
92
|
+
expect(BuildAction).to receive(:send_notification) do |url, body|
|
93
|
+
payload = ::JSON.load(body)
|
94
|
+
expect(payload['appVersion']).to eq '2.0-project'
|
95
|
+
expect(payload['appBundleVersion']).to eq '6'
|
96
|
+
end
|
97
|
+
|
98
|
+
Dir.chdir(File.join(FIXTURE_PATH, 'ios_proj')) do
|
99
|
+
BuildAction.run(load_default_opts.merge({
|
100
|
+
config_file: File.join('Project', 'Info.plist'),
|
101
|
+
app_version: '4.0.0',
|
102
|
+
ios_bundle_version: '400'
|
103
|
+
}))
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delisa Mason
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -140,9 +140,13 @@ files:
|
|
140
140
|
- spec/fixtures/dSYMs/app2.dSYM/Contents/Resources/DWARF/app2
|
141
141
|
- spec/fixtures/files.zip
|
142
142
|
- spec/fixtures/invalid_file
|
143
|
+
- spec/fixtures/ios_proj/FirstRealFolder/Info.plist
|
144
|
+
- spec/fixtures/ios_proj/Project/Info.plist
|
145
|
+
- spec/fixtures/ios_proj/aaTests/Info.plist
|
143
146
|
- spec/fixtures/more_files.zip
|
144
147
|
- spec/fixtures/stuff/app.dSYM/Contents/Resources/DWARF/app
|
145
148
|
- spec/fixtures/stuff/app2.dSYM/Contents/Resources/DWARF/app2
|
149
|
+
- spec/send_build_to_bugsnag_spec.rb
|
146
150
|
- spec/spec_helper.rb
|
147
151
|
homepage: https://github.com/bugsnag/bugsnag-upload
|
148
152
|
licenses:
|
@@ -175,7 +179,11 @@ test_files:
|
|
175
179
|
- spec/fixtures/dSYMs/app2.dSYM/Contents/Resources/DWARF/app2
|
176
180
|
- spec/fixtures/files.zip
|
177
181
|
- spec/fixtures/invalid_file
|
182
|
+
- spec/fixtures/ios_proj/aaTests/Info.plist
|
183
|
+
- spec/fixtures/ios_proj/FirstRealFolder/Info.plist
|
184
|
+
- spec/fixtures/ios_proj/Project/Info.plist
|
178
185
|
- spec/fixtures/more_files.zip
|
179
186
|
- spec/fixtures/stuff/app.dSYM/Contents/Resources/DWARF/app
|
180
187
|
- spec/fixtures/stuff/app2.dSYM/Contents/Resources/DWARF/app2
|
188
|
+
- spec/send_build_to_bugsnag_spec.rb
|
181
189
|
- spec/spec_helper.rb
|