cocoapods-packager-ext 0.0.24 → 0.0.29

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: 6aae27a3f5c25819129ae62c04ca6a2310d0af5a0ae4f325779917c6d4e9a6c2
4
- data.tar.gz: a2b461879db333181773b33b80398702f4651f66fc395a930664a4b50ad66198
3
+ metadata.gz: c9812e5e9a1d1b816716bbdea4c7143cd00a5bb409ced69e87057091795f661c
4
+ data.tar.gz: 49840f81b8ee853a34f1427b2e632b88d397e043ed11e872fcc24de6c5c37073
5
5
  SHA512:
6
- metadata.gz: fb92fea150a95bbd008db873e24a3a37483c84844b54b9a13970c46728ffd62770f0c5ec8f8a022c2891fec8a73474b38720ea10b69273927d49801f5a0876de
7
- data.tar.gz: b7773aee566078b96d2f7515e5452ffe58da0980a55465bcc2b6d139a80b8c8003172752af1d94840ee73f2f151a2b8751a478522dc8ac4fb176c65f17d35620
6
+ metadata.gz: a9de7513e68ce21c894a88f9d4404ec2ee2089e844354ecee9adf3817fdc0d39b72b9c8f8d5e25c80374795f2c713213d980376be458b2f20b81eda975554e27
7
+ data.tar.gz: d4da5a7071c4145eeb38b9b4dfbbef0e98239954c06761fa22ef1a4851c6f316ee4e9092ebff814b1c296b2ba152ce3812e45014d45fb8a02386ffd2be2bffc9
@@ -65,7 +65,8 @@ module Pod
65
65
  begin
66
66
  perform_build(platform, static_sandbox, dynamic_sandbox, static_installer)
67
67
  ensure # in case the build fails; see Builder#xcodebuild.
68
- if not ENV['ENABLE_BACKUP_WORKSPACE']
68
+ if ENV['ENABLE_BACKUP_WORKSPACE'] && (ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'YES' || ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'TRUE')
69
+ else
69
70
  Pathname.new(config.sandbox_root).rmtree
70
71
  FileUtils.rm_f('Podfile.lock')
71
72
  end
@@ -108,7 +109,6 @@ RB
108
109
  newspec += spec_library(platform)
109
110
  else
110
111
  newspec += builder.spec_platform(platform)
111
- newspec += spec_framework(platform)
112
112
  end
113
113
 
114
114
 
@@ -61,7 +61,7 @@ module Pod
61
61
  end
62
62
 
63
63
  def ios_build_options
64
- if ENV['DISABLE_BITCODE']
64
+ if ENV['DISABLE_BITCODE'] && (ENV['DISABLE_BITCODE'].upcase == 'YES' || ENV['DISABLE_BITCODE'].upcase == 'TRUE')
65
65
  "ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-Qunused-arguments\'"
66
66
  else
67
67
  "ARCHS=\'#{ios_architectures.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
@@ -167,7 +167,7 @@ MAP
167
167
 
168
168
  alias copy_resources_t copy_resources
169
169
  def copy_resources
170
- copy_resources_to_target @fwk.resources_path
170
+ copy_resources_to_target @fwk.resources_path unless @dynamic
171
171
  end
172
172
  def copy_resources_to_target(resources_target_path = nil )
173
173
  resources_target_path = @fwk.resources_path if resources_target_path.nil?
@@ -196,6 +196,9 @@ MAP
196
196
  if resources.count > 0
197
197
  `cp -rp #{resources.join(' ')} #{resources_target_path}`
198
198
  end
199
+ if bundles.count > 0
200
+ `cp -rp #{bundles.join(' ')} #{resources_target_path}`
201
+ end
199
202
  end
200
203
  end
201
204
 
@@ -209,6 +212,33 @@ MAP
209
212
  end
210
213
  end
211
214
 
215
+ alias xcodebuild_t xcodebuild
216
+
217
+ def xcodebuild(defines = '', args = '', build_dir = 'build', target = 'Pods-packager', project_root = @static_sandbox_root, config = @config)
218
+ if defined?(Pod::DONT_CODESIGN)
219
+ args = "#{args} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
220
+ end
221
+
222
+ command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{config} -target #{target} -project #{project_root}/Pods.xcodeproj 2>&1"
223
+ output = `#{command}`.lines.to_a
224
+
225
+ if $?.exitstatus != 0
226
+ if ENV['ENABLE_BACKUP_WORKSPACE'] && (ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'YES' || ENV['ENABLE_BACKUP_WORKSPACE'].upcase == 'TRUE')
227
+ target_dir = "#{@source_dir}/#{@spec.name}-#{@spec.version}"
228
+ work_dir = Dir.pwd
229
+ `mv "#{work_dir}" "#{target_dir}"`
230
+ end
231
+ puts UI::BuildFailedReport.report(command, output)
232
+
233
+ # Note: We use `Process.exit` here because it fires a `SystemExit`
234
+ # exception, which gives the caller a chance to clean up before the
235
+ # process terminates.
236
+ #
237
+ # See http://ruby-doc.org/core-1.9.3/Process.html#method-c-exit
238
+ Process.exit
239
+ end
240
+ end
241
+
212
242
  alias initialize_t initialize
213
243
  def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps,exclude_dep_items=[],select_archs=[])
214
244
  @exclude_dep_items = exclude_dep_items
@@ -45,7 +45,7 @@ module Pod
45
45
  config.build_settings['USER_HEADER_SEARCH_PATHS'] = "$(inherited) #{header_path}"
46
46
  config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -ObjC'
47
47
 
48
- if ENV['DISABLE_BITCODE']
48
+ if ENV['DISABLE_BITCODE'] && (ENV['DISABLE_BITCODE'].upcase == 'YES' || ENV['DISABLE_BITCODE'].upcase == 'TRUE')
49
49
  config.build_settings['ENABLE_BITCODE'] = 'NO'
50
50
  end
51
51
  end
@@ -0,0 +1,25 @@
1
+ require 'pathname'
2
+ module Pod
3
+ class Validator
4
+
5
+ alias _xcodebuild_t _xcodebuild
6
+ def _xcodebuild(command, raise_on_failure = false)
7
+ begin
8
+ _xcodebuild_t(command, raise_on_failure)
9
+ rescue => e
10
+ if ENV['PUSH_BACKUP_PATH']
11
+ for item in command
12
+ if item.include?(".xcworkspace")
13
+ # puts command.join(' ')
14
+ path = Pathname.new(item).parent
15
+ puts path
16
+ `mv #{path} #{ENV['PUSH_BACKUP_PATH']}`
17
+ end
18
+ end
19
+ end
20
+ raise e
21
+ end
22
+ end
23
+
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.29"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  require 'cocoapods-packager-ext/command'
2
2
  require 'cocoapods-packager-ext/ext/builder.rb'
3
+ require 'cocoapods-packager-ext/ext/validator.rb'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,6 +73,7 @@ files:
73
73
  - lib/cocoapods-packager-ext/ext/downloader/lnpath.rb
74
74
  - lib/cocoapods-packager-ext/ext/downloader_ext.rb
75
75
  - lib/cocoapods-packager-ext/ext/pod_utils.rb
76
+ - lib/cocoapods-packager-ext/ext/validator.rb
76
77
  - lib/cocoapods-packager-ext/gem_version.rb
77
78
  - lib/cocoapods_plugin.rb
78
79
  - spec/command/ext_spec.rb