mysigner 0.1.4 → 0.1.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: 4fc28e312d574d8651626a8915fc22df043031afcab2166c92a14b353ca47e5d
4
- data.tar.gz: 47261b2578073972306d83c241c68048e629345af59aad58142f490e658c1a62
3
+ metadata.gz: f363c20471bed89a90cb71ac4b6762cbeb5f05e3a7a015dd1e6b0f9a31186561
4
+ data.tar.gz: ea0bebacee050e567361bdd3d0803e74520fefe563ccfbc1bd83f857adc5cecf
5
5
  SHA512:
6
- metadata.gz: bb2adad7a713e9b3ee93284d479bf2114fb87a998b51411406827f08ac5ac06f7f8c89c3eb62dd4aed7350de836562d5aeb645b7bf1a1bffb9a9b13bedec072f
7
- data.tar.gz: 07eac231d1cfd32c46d238ac17678dc1406a4d6c29eab89a315fbf74bcaed224a985d6d87f18963698d59c5df5bfd48be21bbd52ba7dad66f6e0c4595b19ecda
6
+ metadata.gz: c2bdc172b95d45eec70359764baa3b6783ded9ec59798144521ea57c19e09d616d306ef18501428f568dc44204b950c9cde17b34e436f95c9d9f1d821ed3794a
7
+ data.tar.gz: 87ee8d47ef06e8b8fb2dbb96676a75e233b183702b3012b9a4864445ff7653100c2166504384c18a7220c4f4ff18f041a94dc2c7f417850eadcfab076f1ca2ce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mysigner (0.1.4)
4
+ mysigner (0.1.5)
5
5
  base64 (~> 0.2)
6
6
  faraday (~> 2.14)
7
7
  faraday-retry (~> 2.2)
@@ -46,7 +46,11 @@ module Mysigner
46
46
  # Execute build
47
47
  success = execute_with_output(cmd)
48
48
 
49
- raise BuildError, 'Build failed. Check output above for errors.' unless success
49
+ unless success
50
+ msg = +'Build failed.'
51
+ msg << " Full log: #{@last_build_log}" if @last_build_log
52
+ raise BuildError, msg
53
+ end
50
54
 
51
55
  # Verify archive was created
52
56
  raise BuildError, "Build reported success but archive not found at: #{archive_path}" unless File.exist?(archive_path)
@@ -129,40 +133,76 @@ module Mysigner
129
133
  puts ''
130
134
 
131
135
  @build_errors = []
132
-
133
- # Run command and capture output in real-time
134
- IO.popen(cmd, err: %i[child out]) do |io|
135
- io.each_line do |line|
136
- # Filter output to show only important messages
137
- next if line.strip.empty?
138
-
139
- # Detect error lines (case-insensitive for error:)
140
- # Check for various error patterns including curly quotes from Xcode
141
- is_error = line.downcase.include?('error:') ||
142
- line.include?('Provisioning profile') ||
143
- line.include?('Code Sign error') ||
144
- line.include?("doesn't support") ||
145
- line.include?("doesn\u2019t support") ||
146
- line.include?('capability')
147
-
148
- is_warning = line.downcase.include?('warning:')
149
-
150
- # Show and capture errors and warnings
151
- if is_error || is_warning
152
- puts line
153
- @build_errors << line if is_error
154
- # Show progress markers
155
- elsif line.include?('Building') || line.include?('Compiling') ||
156
- line.include?('Linking') || line.include?('Signing') ||
157
- line.include?('Copying')
158
- print '.'
136
+ @last_build_log = log_path_for_run
137
+
138
+ # Capture every line so we can replay it on failure. xcodebuild's
139
+ # `-quiet` plus our keyword filter happily hides framework-loader
140
+ # errors, license issues, and anything that doesn't say "error:" —
141
+ # leaving the user with "Build failed" and nothing actionable. The
142
+ # log file (and tail dump on failure) keeps the full output recoverable.
143
+ File.open(@last_build_log, 'w') do |log|
144
+ # Run command and capture output in real-time
145
+ IO.popen(cmd, err: %i[child out]) do |io|
146
+ io.each_line do |line|
147
+ log.write(line)
148
+
149
+ # Filter output to show only important messages
150
+ next if line.strip.empty?
151
+
152
+ # Detect error lines (case-insensitive for error:)
153
+ # Check for various error patterns including curly quotes from Xcode
154
+ is_error = line.downcase.include?('error:') ||
155
+ line.include?('Provisioning profile') ||
156
+ line.include?('Code Sign error') ||
157
+ line.include?("doesn't support") ||
158
+ line.include?("doesn\u2019t support") ||
159
+ line.include?('capability')
160
+
161
+ is_warning = line.downcase.include?('warning:')
162
+
163
+ # Show and capture errors and warnings
164
+ if is_error || is_warning
165
+ puts line
166
+ @build_errors << line if is_error
167
+ # Show progress markers
168
+ elsif line.include?('Building') || line.include?('Compiling') ||
169
+ line.include?('Linking') || line.include?('Signing') ||
170
+ line.include?('Copying')
171
+ print '.'
172
+ end
159
173
  end
160
174
  end
161
175
  end
162
176
 
163
177
  puts '' # New line after dots
164
178
 
165
- $CHILD_STATUS.success?
179
+ success = $CHILD_STATUS.success?
180
+ dump_log_tail(@last_build_log) unless success
181
+ success
182
+ end
183
+
184
+ def log_path_for_run
185
+ log_dir = File.join(@project_info[:directory], 'build')
186
+ FileUtils.mkdir_p(log_dir)
187
+ File.join(log_dir, 'last-build.log')
188
+ end
189
+
190
+ def dump_log_tail(path, lines: 80)
191
+ return unless File.exist?(path)
192
+
193
+ tail = File.foreach(path).each_with_object([]) do |line, buf|
194
+ buf << line
195
+ buf.shift if buf.size > lines
196
+ end
197
+ return if tail.empty?
198
+
199
+ puts ''
200
+ puts '─' * 80
201
+ puts "Build output (last #{tail.size} lines):"
202
+ puts '─' * 80
203
+ puts tail.join
204
+ puts '─' * 80
205
+ puts "Full log: #{path}"
166
206
  end
167
207
  end
168
208
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'xcodeproj'
4
-
5
3
  module Mysigner
6
4
  module Build
7
5
  class Parser
@@ -184,6 +182,8 @@ module Mysigner
184
182
  end
185
183
 
186
184
  def open_project
185
+ require 'xcodeproj'
186
+
187
187
  if @project_info[:type] == :workspace
188
188
  # Workspace contains multiple projects
189
189
  # Get the main project (not Pods)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mysigner
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysigner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurgen Leka
@@ -308,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
308
  - !ruby/object:Gem::Version
309
309
  version: '0'
310
310
  requirements: []
311
- rubygems_version: 3.6.9
311
+ rubygems_version: 4.0.11
312
312
  specification_version: 4
313
313
  summary: CLI tool for iOS and Android code signing automation via My Signer API
314
314
  test_files: []