unlimit 0.0.4 → 0.0.5

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
  SHA256:
3
- metadata.gz: e800ee943eb907d97c19a2d4763654ed14ff53aec827b97f9e9ea339f2588402
4
- data.tar.gz: 5719937ee73feebd38aa2f50d30f08c558d3739517147874ba7087dd78ee935c
3
+ metadata.gz: a3a20115c2b5b50d7fa946db2b1abefba8e3ac1ad6e4d0414291d93bdd25ada4
4
+ data.tar.gz: 9a41dd285baf4a8048909ca2119d81227f22fd86ce6f2f27f17cabea954c16e7
5
5
  SHA512:
6
- metadata.gz: a8b8f2940e95ee8f4674b6a5df83a0190a02b6bb38d19923926a29db0cc62b3b919eedfdf865dc1d297d83f1783b02e7c6b8a26b92d0dc4c8b284438e304ebad
7
- data.tar.gz: 5d498d185d71ae0ebf4f1fac16c6808dc539f92f731d01d80c5ef17d973dbe5cffe13a49c07180fa6f4e6df43ec01e177fc20594779fd812d99d111467c84821
6
+ metadata.gz: bc609631ef98dfb7655cedf664babfdd2bac637f3874caa4ef25cce0069f83b5d8f36b0e9ecd018e30ab402765a52bbfa5bf513e9a98639b8c9e9cdd0d50909f
7
+ data.tar.gz: 4a0daf72aaf1c9ab24a3dfde24c47d66d0e9205e6be441318f49660f44ebd2e2fc819eee55ecd0b2f882d197fc61f89aba55d914c4b4c49752eba5378f9101c3
@@ -1,4 +1,11 @@
1
1
  # Change Log
2
+
3
+ ## [0.0.5](https://github.com/biocross/unlimit/releases/tag/0.0.5)
4
+ Released on 2019-08-25.
5
+
6
+ #### Added
7
+ - Unlimit now has Sentry integrated for error reporting in the gem.
8
+
2
9
  ## [0.0.4](https://github.com/biocross/unlimit/releases/tag/0.0.4)
3
10
  Released on 2019-08-24.
4
11
 
@@ -6,12 +6,13 @@ PATH
6
6
  fastlane (>= 2.116.0)
7
7
  highline
8
8
  plist
9
+ sentry-raven
9
10
  xcodeproj
10
11
 
11
12
  GEM
12
13
  remote: https://rubygems.org/
13
14
  specs:
14
- CFPropertyList (3.0.0)
15
+ CFPropertyList (3.0.1)
15
16
  activesupport (4.2.11.1)
16
17
  i18n (~> 0.7)
17
18
  minitest (~> 5.1)
@@ -92,9 +93,9 @@ GEM
92
93
  representable (~> 3.0)
93
94
  retriable (>= 2.0, < 4.0)
94
95
  signet (~> 0.9)
95
- google-cloud-core (1.3.0)
96
+ google-cloud-core (1.3.1)
96
97
  google-cloud-env (~> 1.0)
97
- google-cloud-env (1.2.0)
98
+ google-cloud-env (1.2.1)
98
99
  faraday (~> 0.11)
99
100
  google-cloud-storage (1.16.0)
100
101
  digest-crc (~> 0.4)
@@ -139,6 +140,8 @@ GEM
139
140
  rouge (2.0.7)
140
141
  rubyzip (1.2.3)
141
142
  security (0.1.3)
143
+ sentry-raven (2.11.0)
144
+ faraday (>= 0.7.6, < 1.0)
142
145
  signet (0.11.0)
143
146
  addressable (~> 2.3)
144
147
  faraday (~> 0.9)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'unlimit/version'
4
+ require 'sentry-raven'
4
5
  require 'xcodeproj'
5
6
  require 'securerandom'
6
7
  require 'json'
@@ -38,241 +39,256 @@ module Unlimit
38
39
  end
39
40
 
40
41
  def start(options)
41
- puts Divider
42
- puts " unlimit 🚀📲 (#{Unlimit::VERSION}) "
43
- puts ' Switching your project to Personal Team! '.yellow
44
- puts Divider
42
+ Raven.configure do |config|
43
+ config.silence_ready = true
44
+ config.logger = Raven::Logger.new(nil)
45
+ config.dsn = 'https://bcd26f187d56482ca4fd1b6732103e87:7f5c3421630b4f50804525bfdfa25d6d@sentry.io/1541037'
46
+ end
45
47
 
46
- xcode_project_files = Dir.glob('*.xcodeproj')
47
- project_path = ''
48
- plist_path = ''
49
- target_name = ''
50
- personal_team_id = ''
51
- uses_app_groups = false
52
- app_group_name = ''
53
- entitlements_file = ''
54
- project_configuration_file = ''
55
- extensions = []
56
- target = nil
57
-
58
- cli = HighLine.new
59
-
60
- # Check for a valid xcode_project
61
- if xcode_project_files.count == 1 || options.key?(ProjectPathKey)
62
- project_path = if options.key?(ProjectPathKey)
63
- options[ProjectPathKey]
64
- else
65
- xcode_project_files.first
66
- end
67
-
68
- unless File.directory?(project_path)
69
- abort("Project not found at #{project_path}".red)
48
+ Raven.tags_context(
49
+ bundler: !ENV['BUNDLE_GEMFILE'].empty?,
50
+ unlimit_version: Unlimit::VERSION
51
+ )
52
+
53
+ Raven.capture do
54
+ puts Divider
55
+ puts " unlimit 🚀📲 (#{Unlimit::VERSION}) "
56
+ puts ' Switching your project to Personal Team! '.yellow
57
+ puts Divider
58
+
59
+ xcode_project_files = Dir.glob('*.xcodeproj')
60
+ project_path = ''
61
+ plist_path = ''
62
+ target_name = ''
63
+ personal_team_id = ''
64
+ uses_app_groups = false
65
+ app_group_name = ''
66
+ entitlements_file = ''
67
+ project_configuration_file = ''
68
+ extensions = []
69
+ target = nil
70
+ session_uuid = SecureRandom.uuid
71
+
72
+ cli = HighLine.new
73
+ Raven.capture_message('Begin', :level => 'info')
74
+
75
+ # Check for a valid xcode_project
76
+ if xcode_project_files.count == 1 || options.key?(ProjectPathKey)
77
+ project_path = if options.key?(ProjectPathKey)
78
+ options[ProjectPathKey]
79
+ else
80
+ xcode_project_files.first
81
+ end
82
+
83
+ unless File.directory?(project_path)
84
+ abort("Project not found at #{project_path}".red)
85
+ end
86
+ putsWithOverrides('project', project_path, ProjectPathKey)
87
+ else
88
+ abort('Please specify the .xcodeproj project file to use with the --project option like --project MyProject.xcodeproj'.red)
70
89
  end
71
- putsWithOverrides('project', project_path, ProjectPathKey)
72
- else
73
- abort('Please specify the .xcodeproj project file to use with the --project option like --project MyProject.xcodeproj'.red)
74
- end
75
90
 
76
- project = Xcodeproj::Project.open(project_path)
91
+ project = Xcodeproj::Project.open(project_path)
77
92
 
78
- if options.key?(TargetNameKey)
79
- target_name = options[TargetNameKey]
80
- target = project.targets.find { |t| t.name == target_name }
81
- abort "Couldn't find the target '#{target_name}' in '#{project_path}'" if target.nil?
82
- puts "Using target #{target_name}"
83
- else
84
- project.targets.each do |current_target|
85
- next unless current_target.product_type == ProductTypeApplicationTarget
93
+ if options.key?(TargetNameKey)
94
+ target_name = options[TargetNameKey]
95
+ target = project.targets.find { |t| t.name == target_name }
96
+ abort "Couldn't find the target '#{target_name}' in '#{project_path}'" if target.nil?
97
+ puts "Using target #{target_name}"
98
+ else
99
+ project.targets.each do |current_target|
100
+ next unless current_target.product_type == ProductTypeApplicationTarget
86
101
 
87
- target = current_target
88
- target_name = current_target.name
89
- putsWithOverrides('target', target_name, TargetNameKey)
102
+ target = current_target
103
+ target_name = current_target.name
104
+ putsWithOverrides('target', target_name, TargetNameKey)
90
105
 
91
- # Remove Fabric Script build phase to stop the annoying "new app" email
92
- unless options.key?(KeepFabricKey)
93
- current_target.build_phases.each do |build_phase|
94
- next unless build_phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) && build_phase.shell_script.include?('/Fabric/run')
106
+ # Remove Fabric Script build phase to stop the annoying "new app" email
107
+ unless options.key?(KeepFabricKey)
108
+ current_target.build_phases.each do |build_phase|
109
+ next unless build_phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) && build_phase.shell_script.include?('/Fabric/run')
95
110
 
96
- build_phase.shell_script = '#' + build_phase.shell_script
111
+ build_phase.shell_script = '#' + build_phase.shell_script
112
+ end
97
113
  end
114
+ break
98
115
  end
99
- break
100
116
  end
101
- end
102
117
 
103
- if options.key?(PlistPathKey)
104
- plist_path = options[PlistPathKey]
118
+ if options.key?(PlistPathKey)
119
+ plist_path = options[PlistPathKey]
105
120
 
106
- unless File.file?(plist_path)
107
- abort("Info.plist file not found at path: #{plist_path}".red)
108
- end
109
- puts "Using Info.plist at path #{plist_path}.".green
110
- else
111
- if target.build_configurations.count > 0
112
- build_settings = target.build_configurations.first.build_settings
113
- plist_path = build_settings[InfoPlistBuildSettingKey]
114
- putsWithOverrides('Info.plist', plist_path, PlistPathKey)
115
- end
121
+ unless File.file?(plist_path)
122
+ abort("Info.plist file not found at path: #{plist_path}".red)
123
+ end
124
+ puts "Using Info.plist at path #{plist_path}.".green
125
+ else
126
+ if target.build_configurations.count > 0
127
+ build_settings = target.build_configurations.first.build_settings
128
+ plist_path = build_settings[InfoPlistBuildSettingKey]
129
+ putsWithOverrides('Info.plist', plist_path, PlistPathKey)
130
+ end
116
131
 
117
- if plist_path.nil? || plist_path.empty?
118
- abort('Please specify the path to your main target\'s Info.plist file with the --plist option like --plist MyProject-Info.plist'.red)
132
+ if plist_path.nil? || plist_path.empty?
133
+ abort('Please specify the path to your main target\'s Info.plist file with the --plist option like --plist MyProject-Info.plist'.red)
134
+ end
119
135
  end
120
- end
121
136
 
122
- if options.key?(ProjectConfigurationFileKey)
123
- project_configuration_file = options[ProjectConfigurationFileKey]
137
+ if options.key?(ProjectConfigurationFileKey)
138
+ project_configuration_file = options[ProjectConfigurationFileKey]
124
139
 
125
- unless File.file?(project_configuration_file)
126
- abort("YAML Configuration file not found at path: #{project_configuration_file}".red)
140
+ unless File.file?(project_configuration_file)
141
+ abort("YAML Configuration file not found at path: #{project_configuration_file}".red)
142
+ end
143
+ puts "Using YAML Configuration at path #{project_configuration_file}.".green
144
+ else
145
+ project_configuration_file = DefaultProjectConfigurationFilePath
146
+ putsWithOverrides('YAML Configuration', project_configuration_file, ProjectConfigurationFileKey)
127
147
  end
128
- puts "Using YAML Configuration at path #{project_configuration_file}.".green
129
- else
130
- project_configuration_file = DefaultProjectConfigurationFilePath
131
- putsWithOverrides('YAML Configuration', project_configuration_file, ProjectConfigurationFileKey)
132
- end
133
148
 
134
- project.targets.each do |target|
135
- if target.product_type.include? 'app-extension'
136
- extensions.push(target.name)
149
+ project.targets.each do |target|
150
+ if target.product_type.include? 'app-extension'
151
+ extensions.push(target.name)
152
+ end
137
153
  end
138
- end
139
154
 
140
- if options.key?(TeamIDKey)
141
- personal_team_id = options[TeamIDKey]
142
- putsWithOverrides('Team ID', personal_team_id, TeamIDKey)
143
- else
144
- valid_codesigning_identities, stderr, status = Open3.capture3('security find-identity -p codesigning -v')
145
- personal_teams = valid_codesigning_identities.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)
146
- if personal_teams.size == 1
147
- personal_team_name = personal_teams.first.strip
148
- personal_team_id, stderr, status = Open3.capture3("security find-certificate -c #{personal_team_name} -p | openssl x509 -text | grep -o OU=[^,]* | grep -v Apple | sed s/OU=//g")
149
- personal_team_id = personal_team_id.strip
150
- putsWithOverrides("Team ID (from: #{personal_team_name})", personal_team_id, TeamIDKey)
155
+ if options.key?(TeamIDKey)
156
+ personal_team_id = options[TeamIDKey]
157
+ putsWithOverrides('Team ID', personal_team_id, TeamIDKey)
151
158
  else
152
- puts "\nYou have quite a few developer identities on your machine. unlimit is unable to decide which one to use 😅".yellow
153
- puts 'If you know the Team ID to use, pass it with the --teamid flag like --teamid 6A2T6455Y3'.yellow
154
- puts "\nFor now, choose one from the list below: (The one most likely to work will have your email)".yellow
155
- puts 'Which codesigning identity should unlimit use?'.green
156
- selected_team = ''
157
- codesigning_options = valid_codesigning_identities.split("\n")
158
- codesigning_options = codesigning_options.select { |line| line.include?(')') }
159
- codesigning_options = codesigning_options.map { |identity| identity.scan(/\d+\) (.+)/).first.first }
160
- cli.choose do |menu|
161
- menu.prompt = 'Select one by entering the number: '
162
- codesigning_options.each do |identity|
163
- menu.choice(identity) { cli.say(identity); selected_team = identity }
159
+ valid_codesigning_identities, stderr, status = Open3.capture3('security find-identity -p codesigning -v')
160
+ personal_teams = valid_codesigning_identities.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)
161
+ if personal_teams.size == 1
162
+ personal_team_name = personal_teams.first.strip
163
+ personal_team_id, stderr, status = Open3.capture3("security find-certificate -c #{personal_team_name} -p | openssl x509 -text | grep -o OU=[^,]* | grep -v Apple | sed s/OU=//g")
164
+ personal_team_id = personal_team_id.strip
165
+ putsWithOverrides("Team ID (from: #{personal_team_name})", personal_team_id, TeamIDKey)
166
+ else
167
+ puts "\nYou have quite a few developer identities on your machine. unlimit is unable to decide which one to use 😅".yellow
168
+ puts 'If you know the Team ID to use, pass it with the --teamid flag like --teamid 6A2T6455Y3'.yellow
169
+ puts "\nFor now, choose one from the list below: (The one most likely to work will have your email)".yellow
170
+ puts 'Which codesigning identity should unlimit use?'.green
171
+ selected_team = ''
172
+ codesigning_options = valid_codesigning_identities.split("\n")
173
+ codesigning_options = codesigning_options.select { |line| line.include?(')') }
174
+ codesigning_options = codesigning_options.map { |identity| identity.scan(/\d+\) (.+)/).first.first }
175
+ cli.choose do |menu|
176
+ menu.prompt = 'Select one by entering the number: '
177
+ codesigning_options.each do |identity|
178
+ menu.choice(identity) { cli.say(identity); selected_team = identity }
179
+ end
164
180
  end
165
- end
166
181
 
167
- personal_team = selected_team.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)
168
- personal_team_name = personal_team.first.strip
169
- personal_team_id, stderr, status = Open3.capture3("security find-certificate -c #{personal_team_name} -p | openssl x509 -text | grep -o OU=[^,]* | grep -v Apple | sed s/OU=//g")
170
- personal_team_id = personal_team_id.strip
171
- putsWithOverrides("Team ID (from: #{personal_team_name})", personal_team_id, TeamIDKey)
182
+ personal_team = selected_team.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)
183
+ personal_team_name = personal_team.first.strip
184
+ personal_team_id, stderr, status = Open3.capture3("security find-certificate -c #{personal_team_name} -p | openssl x509 -text | grep -o OU=[^,]* | grep -v Apple | sed s/OU=//g")
185
+ personal_team_id = personal_team_id.strip
186
+ putsWithOverrides("Team ID (from: #{personal_team_name})", personal_team_id, TeamIDKey)
187
+ end
172
188
  end
173
- end
174
189
 
175
- puts "#{Divider}\n"
190
+ puts "#{Divider}\n"
176
191
 
177
- # Turn off capabilities that require entitlements
178
- puts 'Turning OFF all Capabilities'.red
179
- project.root_object.attributes.each do |value|
180
- next unless value[0] == 'TargetAttributes'
192
+ # Turn off capabilities that require entitlements
193
+ puts 'Turning OFF all Capabilities'.red
194
+ project.root_object.attributes.each do |value|
195
+ next unless value[0] == 'TargetAttributes'
181
196
 
182
- hash = value[1]
183
- hash.each do |_key, val|
184
- next unless val.key?('SystemCapabilities')
197
+ hash = value[1]
198
+ hash.each do |_key, val|
199
+ next unless val.key?('SystemCapabilities')
185
200
 
186
- capabilities = val['SystemCapabilities']
187
- capabilities.each do |key, val|
188
- next unless val.key?('enabled')
201
+ capabilities = val['SystemCapabilities']
202
+ capabilities.each do |key, val|
203
+ next unless val.key?('enabled')
189
204
 
190
- if key.include?('com.apple.ApplicationGroups.iOS')
191
- uses_app_groups = true
192
- end
205
+ if key.include?('com.apple.ApplicationGroups.iOS')
206
+ uses_app_groups = true
207
+ end
193
208
 
194
- unless CapabilitiesWhitelist.include?(key)
195
- puts ' Turning OFF ' + key
196
- capabilities[key]['enabled'] = '0'
209
+ unless CapabilitiesWhitelist.include?(key)
210
+ puts ' Turning OFF ' + key
211
+ capabilities[key]['enabled'] = '0'
212
+ end
197
213
  end
198
214
  end
199
215
  end
200
- end
201
- project.save
202
-
203
- # Remove Entitlements
204
- puts 'Clearing entitlements...'.red
205
- Dir.glob('**/*.entitlements').each do |source_file|
206
- entitlements_plist = uses_app_groups ? { "com.apple.security.application-groups": '' }.to_plist : {}.to_plist
207
- entitlements_file = source_file if uses_app_groups
208
- File.open(source_file, 'w') { |file| file.puts entitlements_plist }
209
- end
216
+ project.save
217
+
218
+ # Remove Entitlements
219
+ puts 'Clearing entitlements...'.red
220
+ Dir.glob('**/*.entitlements').each do |source_file|
221
+ entitlements_plist = uses_app_groups ? { "com.apple.security.application-groups": '' }.to_plist : {}.to_plist
222
+ entitlements_file = source_file if uses_app_groups
223
+ File.open(source_file, 'w') { |file| file.puts entitlements_plist }
224
+ end
210
225
 
211
- # Remove Capability Keys from Plist
212
- puts 'Removing capabilities from Info.plist...'.red
213
- info_plist = Plist.parse_xml(plist_path)
214
- info_plist.delete('UIBackgroundModes')
215
- File.open(plist_path, 'w') { |file| file.puts info_plist.to_plist }
216
-
217
- # Change Bundle Identifier
218
- puts 'Changing bundle identifier...'.red
219
- bundle_identifier = "com.unlimit.#{SecureRandom.uuid}"
220
- system("#{FastlaneEnvironmentVariables} bundle exec fastlane run update_app_identifier plist_path:#{plist_path} app_identifier:#{bundle_identifier}")
221
-
222
- if uses_app_groups # Create a temporary fastfile, and set the app group identifiers
223
- app_group_name = "group.#{bundle_identifier}"
224
- fastfile = "lane :set_app_group do
225
- update_app_group_identifiers(entitlements_file: \"#{entitlements_file}\", app_group_identifiers: ['#{app_group_name}'])
226
- end"
227
-
228
- existingFastfile = ''
229
- if File.file?(FastFilePath)
230
- File.open('./fastlane/Fastfile', 'r') do |file|
231
- existingFastfile = file.read
226
+ # Remove Capability Keys from Plist
227
+ puts 'Removing capabilities from Info.plist...'.red
228
+ info_plist = Plist.parse_xml(plist_path)
229
+ info_plist.delete('UIBackgroundModes')
230
+ File.open(plist_path, 'w') { |file| file.puts info_plist.to_plist }
231
+
232
+ # Change Bundle Identifier
233
+ puts 'Changing bundle identifier...'.red
234
+ bundle_identifier = "com.unlimit.#{session_uuid}"
235
+ system("#{FastlaneEnvironmentVariables} bundle exec fastlane run update_app_identifier plist_path:#{plist_path} app_identifier:#{bundle_identifier}")
236
+
237
+ if uses_app_groups # Create a temporary fastfile, and set the app group identifiers
238
+ app_group_name = "group.#{bundle_identifier}"
239
+ fastfile = "lane :set_app_group do
240
+ update_app_group_identifiers(entitlements_file: \"#{entitlements_file}\", app_group_identifiers: ['#{app_group_name}'])
241
+ end"
242
+
243
+ existingFastfile = ''
244
+ if File.file?(FastFilePath)
245
+ File.open('./fastlane/Fastfile', 'r') do |file|
246
+ existingFastfile = file.read
247
+ end
232
248
  end
249
+ File.open(FastFilePath, 'w') do |file|
250
+ file.write(fastfile)
251
+ end
252
+ system("#{FastlaneEnvironmentVariables} bundle exec fastlane set_app_group")
253
+ existingFastfile.empty? ? File.delete(FastFilePath) : File.open('./fastlane/Fastfile', 'w') { |file| file.write(existingFastfile) }
233
254
  end
234
- File.open(FastFilePath, 'w') do |file|
235
- file.write(fastfile)
236
- end
237
- system("#{FastlaneEnvironmentVariables} bundle exec fastlane set_app_group")
238
- existingFastfile.empty? ? File.delete(FastFilePath) : File.open('./fastlane/Fastfile', 'w') { |file| file.write(existingFastfile) }
239
- end
240
255
 
241
- puts 'Enabling Automatic Code Signing...'.red
242
- system("#{FastlaneEnvironmentVariables} bundle exec fastlane run automatic_code_signing use_automatic_signing:true targets:#{target_name}")
256
+ puts 'Enabling Automatic Code Signing...'.red
257
+ system("#{FastlaneEnvironmentVariables} bundle exec fastlane run automatic_code_signing use_automatic_signing:true targets:#{target_name}")
243
258
 
244
- puts 'Switching to Personal Team...'.red
245
- system("#{FastlaneEnvironmentVariables} bundle exec fastlane run update_project_team teamid:\"#{personal_team_id}\" targets:#{target_name}")
259
+ puts 'Switching to Personal Team...'.red
260
+ system("#{FastlaneEnvironmentVariables} bundle exec fastlane run update_project_team teamid:\"#{personal_team_id}\" targets:#{target_name}")
246
261
 
247
- # Remove App Extensions
248
- unless extensions.empty?
249
- app_extensions = extensions.join(', ')
250
- puts "Removing App Extensions: #{app_extensions}".red
251
- system("bundle exec configure_extensions remove #{project_path} #{target_name} #{app_extensions}")
252
- end
262
+ # Remove App Extensions
263
+ unless extensions.empty?
264
+ app_extensions = extensions.join(', ')
265
+ puts "Removing App Extensions: #{app_extensions}".red
266
+ system("bundle exec configure_extensions remove #{project_path} #{target_name} #{app_extensions}")
267
+ end
253
268
 
254
- if File.file?(project_configuration_file)
255
- puts "Running Custom Scripts from #{project_configuration_file}".red
256
- local_configuration = YAML.load_file(project_configuration_file)
257
- unless local_configuration['custom_scripts'].empty?
258
- environment_variables = { 'UNLIMIT_PROJECT_PATH' => project_path, 'UNLIMIT_TARGET_NAME' => target_name, 'UNLIMIT_PLIST_PATH' => plist_path, 'UNLIMIT_TEAM_ID' => personal_team_id, 'UNLIMIT_APP_BUNDLE_ID' => bundle_identifier, 'UNLIMIT_APP_GROUP_NAME' => app_group_name }
259
- local_configuration['custom_scripts'].each do |script|
260
- script = script.to_s
261
- environment_variables.each do |key, variable|
262
- script.gsub!(key.to_s, variable.to_s)
269
+ if File.file?(project_configuration_file)
270
+ puts "Running Custom Scripts from #{project_configuration_file}".red
271
+ local_configuration = YAML.load_file(project_configuration_file)
272
+ unless local_configuration['custom_scripts'].empty?
273
+ environment_variables = { 'UNLIMIT_PROJECT_PATH' => project_path, 'UNLIMIT_TARGET_NAME' => target_name, 'UNLIMIT_PLIST_PATH' => plist_path, 'UNLIMIT_TEAM_ID' => personal_team_id, 'UNLIMIT_APP_BUNDLE_ID' => bundle_identifier, 'UNLIMIT_APP_GROUP_NAME' => app_group_name }
274
+ local_configuration['custom_scripts'].each do |script|
275
+ script = script.to_s
276
+ environment_variables.each do |key, variable|
277
+ script.gsub!(key.to_s, variable.to_s)
278
+ end
279
+ puts "Running: #{script}".green
280
+ output, stderr, status = Open3.capture3(script)
281
+ puts output unless output.empty?
282
+ puts stderr unless stderr.empty?
283
+ puts "Done with Status: #{status}"
263
284
  end
264
- puts "Running: #{script}".green
265
- output, stderr, status = Open3.capture3(script)
266
- puts output unless output.empty?
267
- puts stderr unless stderr.empty?
268
- puts "Done with Status: #{status}"
269
- end
285
+ end
270
286
  end
271
- end
272
-
273
- puts "\n#{Divider}"
274
- puts 'You\'re good to go! Just connect your device and hit run!'.green
275
- puts Divider
276
- end
287
+ Raven.capture_message('Finished', :level => 'info')
288
+ puts "\n#{Divider}"
289
+ puts 'You\'re good to go! Just connect your device and hit run!'.green
290
+ puts Divider
291
+ end
292
+ end
277
293
  end
278
294
  end
@@ -1,3 +1,3 @@
1
1
  module Unlimit
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -37,6 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency 'xcodeproj'
38
38
  spec.add_dependency 'plist'
39
39
  spec.add_dependency 'fastlane', '>= 2.116.0'
40
+ spec.add_dependency 'sentry-raven'
40
41
  spec.add_dependency 'configure_extensions'
41
42
  spec.add_dependency 'highline'
42
43
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unlimit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siddharth Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-24 00:00:00.000000000 Z
11
+ date: 2019-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.116.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: sentry-raven
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: configure_extensions
57
71
  requirement: !ruby/object:Gem::Requirement