cocoapods 1.9.3 → 1.10.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +167 -5
  3. data/README.md +2 -1
  4. data/lib/cocoapods.rb +3 -1
  5. data/lib/cocoapods/command.rb +12 -2
  6. data/lib/cocoapods/command/lib/lint.rb +12 -3
  7. data/lib/cocoapods/command/repo/push.rb +1 -1
  8. data/lib/cocoapods/command/repo/update.rb +11 -0
  9. data/lib/cocoapods/command/spec/lint.rb +12 -3
  10. data/lib/cocoapods/config.rb +17 -0
  11. data/lib/cocoapods/downloader/cache.rb +2 -2
  12. data/lib/cocoapods/gem_version.rb +1 -1
  13. data/lib/cocoapods/generator/app_target_helper.rb +10 -2
  14. data/lib/cocoapods/generator/copy_dsyms_script.rb +56 -0
  15. data/lib/cocoapods/generator/copy_resources_script.rb +2 -14
  16. data/lib/cocoapods/generator/copy_xcframework_script.rb +245 -0
  17. data/lib/cocoapods/generator/embed_frameworks_script.rb +125 -212
  18. data/lib/cocoapods/generator/script_phase_constants.rb +99 -0
  19. data/lib/cocoapods/installer.rb +70 -3
  20. data/lib/cocoapods/installer/analyzer.rb +17 -8
  21. data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +1 -1
  22. data/lib/cocoapods/installer/base_install_hooks_context.rb +135 -0
  23. data/lib/cocoapods/installer/installation_options.rb +5 -0
  24. data/lib/cocoapods/installer/pod_source_installer.rb +2 -1
  25. data/lib/cocoapods/installer/post_install_hooks_context.rb +1 -127
  26. data/lib/cocoapods/installer/post_integrate_hooks_context.rb +9 -0
  27. data/lib/cocoapods/installer/sandbox_dir_cleaner.rb +2 -1
  28. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +132 -111
  29. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +45 -6
  30. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +13 -27
  31. data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +2 -1
  32. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +4 -4
  33. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +175 -58
  34. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +61 -30
  35. data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +3 -2
  36. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +5 -7
  37. data/lib/cocoapods/installer/xcode/pods_project_generator_result.rb +19 -0
  38. data/lib/cocoapods/installer/xcode/target_validator.rb +1 -1
  39. data/lib/cocoapods/sources_manager.rb +2 -1
  40. data/lib/cocoapods/target.rb +44 -2
  41. data/lib/cocoapods/target/aggregate_target.rb +35 -0
  42. data/lib/cocoapods/target/build_settings.rb +84 -17
  43. data/lib/cocoapods/target/pod_target.rb +85 -11
  44. data/lib/cocoapods/user_interface/error_report.rb +1 -1
  45. data/lib/cocoapods/user_interface/inspector_reporter.rb +3 -10
  46. data/lib/cocoapods/validator.rb +32 -8
  47. data/lib/cocoapods/xcode/framework_paths.rb +1 -1
  48. data/lib/cocoapods/xcode/xcframework.rb +17 -4
  49. data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +81 -3
  50. metadata +30 -38
  51. data/lib/cocoapods/generator/prepare_artifacts_script.rb +0 -257
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa7878249570ad66ff3930c61f35b24bc7a3a5447425f64711363d0bf1081bdc
4
- data.tar.gz: 0f7bf9791f2907f913c57d73c55a6d9a72fb25f765d53f1743c9111c8cc3273c
3
+ metadata.gz: b20313588dcd7f5304834e2f2323a0b82bdb88e9fa1399c590715e5e8327dd0a
4
+ data.tar.gz: 440dca113c086ca0c2be592c625b04cde71ec3f3b42767bedce2c0e237d949ed
5
5
  SHA512:
6
- metadata.gz: fe71aa5cf13d5c88f007ee5946d64deb9b1114742b244af9a1528cc80dd0649f2de012d80ac24a63c9a2195d4c86ab79a29383bab545db68167c6da76d37ff9b
7
- data.tar.gz: 20442eda6adb03829c5496623a4fa7e63f0ef36dff4b7bff3fa55e85e553c6c680765cadb46764db71b7b60280a35e16e92eea915215c5a3a557a8f2d274d5b2
6
+ metadata.gz: 30216b5c073bd8c16528007410e17981b6711551900386081dc5aec20cbdb8d3fb15a47ead27752b1d1a67bdec627c2b2717911f095e4a8b2ad8e92e076c7a94
7
+ data.tar.gz: bb9dc6f0144897d8b1a10be06643b51d273ac0c60340187e9bf022a12762ac698e360970acac191dba7f8b5774d64b9e7d0764e7d2f839245c08c9305b0166a9
@@ -4,6 +4,171 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.10.0.beta.1 (2020-07-17)
8
+
9
+ ##### Breaking
10
+
11
+ * Bump minimum Ruby version to 2.3.3 (included with macOS High Sierra)
12
+ [Eric Amorde](https://github.com/amorde)
13
+ [#9821](https://github.com/CocoaPods/CocoaPods/issues/9821)
14
+
15
+ ##### Enhancements
16
+
17
+ * Add the App Clip product symbol to the list of products that need embedding.
18
+ [Igor Makarov](https://github.com/igor-makarov)
19
+ [#9882](https://github.com/CocoaPods/CocoaPods/pull/9882)
20
+
21
+ * Allow gem to run as root when passing argument flag `--allow-root`
22
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
23
+ [#8929](https://github.com/CocoaPods/CocoaPods/issues/8929)
24
+
25
+ * Warn users to delete the master specs repo if its not explicitly used.
26
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
27
+ [#9871](https://github.com/CocoaPods/CocoaPods/pull/9871)
28
+
29
+ * Use User Project's compatibilityVersion instead of objectVersion when
30
+ deciding when to use xcfilelists.
31
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
32
+ [#9140](https://github.com/CocoaPods/CocoaPods/issues/9140)
33
+
34
+ * add a `--configuration` option to `pod lib lint` and `pod spec lint`.
35
+ [Gereon Steffens](https://github.com/gereons)
36
+ [#9686](https://github.com/CocoaPods/CocoaPods/issues/9686)
37
+
38
+ * Add a post_integrate_hook API
39
+ [lucasmpaim](https://github.com/lucasmpaim)
40
+ [#7432](https://github.com/CocoaPods/CocoaPods/issues/7432)
41
+
42
+ * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with
43
+ a target that has the setting set to `YES` (directly or in an .xcconfig).
44
+ [Juanjo López](https://github.com/juanjonol)
45
+ [#9232](https://github.com/CocoaPods/CocoaPods/issues/9232)
46
+
47
+ * Option to lint a specified set of test_specs
48
+ [Paul Beusterien](https://github.com/paulb777)
49
+ [#9392](https://github.com/CocoaPods/CocoaPods/pull/9392)
50
+
51
+ * Add --use-static-frameworks lint option
52
+ [Paul Beusterien](https://github.com/paulb777)
53
+ [#9632](https://github.com/CocoaPods/CocoaPods/pull/9632)
54
+
55
+ * Exclude the local spec-repos directory from Time Machine Backups.
56
+ [Jakob Krigovsky](https://github.com/sonicdoe)
57
+ [#8308](https://github.com/CocoaPods/CocoaPods/issues/8308)
58
+
59
+ ##### Bug Fixes
60
+
61
+ * Override Xcode 12 default for erroring on quoted imports in umbrellas.
62
+ [Paul Beusterien](https://github.com/paulb777)
63
+ [#9902](https://github.com/CocoaPods/CocoaPods/issues/9902)
64
+
65
+ * Remove bitcode symbol maps from embedded framework bundles
66
+ [Eric Amorde](https://github.com/amorde)
67
+ [#9681](https://github.com/CocoaPods/CocoaPods/issues/9681)
68
+
69
+ * Prevent "source changed" message for every version change when using trunk source
70
+ [cltnschlosser](https://github.com/cltnschlosser)
71
+ [#9865](https://github.com/CocoaPods/CocoaPods/issues/9865)
72
+
73
+ * When pod target is a static framework, save time by copying compiled resources
74
+ [Igor Makarov](https://github.com/igor-makarov)
75
+ [#9441](https://github.com/CocoaPods/CocoaPods/pull/9441)
76
+
77
+ * Re-implement `bcsymbolmap` copying to avoid duplicate outputs.
78
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
79
+ [mplorentz](https://github.com/mplorentz)
80
+ [#9734](https://github.com/CocoaPods/CocoaPods/pull/9734)
81
+
82
+ * Fix Xcode 11 warning when setting Bundle Identifier in `info_plist`
83
+ [Sean Reinhardt](https://github.com/seanreinhardtapps)
84
+ [#9536](https://github.com/CocoaPods/CocoaPods/issues/9536)
85
+
86
+ * Fix `incompatible encoding regexp match` for linting non-ascii pod name
87
+ [banjun](https://github.com/banjun)
88
+ [#9765](https://github.com/CocoaPods/CocoaPods/issues/9765)
89
+ [#9776](https://github.com/CocoaPods/CocoaPods/pull/9776)
90
+
91
+ * Fix crash when targets missing in Podfile
92
+ [Paul Beusterien](https://github.com/paulb777)
93
+ [#9745](https://github.com/CocoaPods/CocoaPods/pull/9745)
94
+
95
+ * Fix adding developer library search paths during pod validation.
96
+ [Nick Entin](https://github.com/NickEntin)
97
+ [#9736](https://github.com/CocoaPods/CocoaPods/pull/9736)
98
+
99
+ * Fix an issue that caused multiple xcframework scripts to produce the same output files
100
+ [Eric Amorde](https://github.com/amorde)
101
+ [#9670](https://github.com/CocoaPods/CocoaPods/issues/9670)
102
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
103
+
104
+ * Fix an issue preventing framework user targets with an xcframework dependency from building successfully
105
+ [Eric Amorde](https://github.com/amorde)
106
+ [#9525](https://github.com/CocoaPods/CocoaPods/issues/9525)
107
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
108
+
109
+ * Fix an issue preventing xcframeworks that wrapped static libraries from linking successfully
110
+ [Eric Amorde](https://github.com/amorde)
111
+ [#9528](https://github.com/CocoaPods/CocoaPods/issues/9528)
112
+ [#9720](https://github.com/CocoaPods/CocoaPods/pull/9720)
113
+
114
+ * Fix setting `swift_version` when deduplicate targets is turned off.
115
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
116
+ [#9689](https://github.com/CocoaPods/CocoaPods/pull/9689)
117
+
118
+ * Honor prefix_header_file=false for subspecs
119
+ [Paul Beusterien](https://github.com/paulb777)
120
+ [#9687](https://github.com/CocoaPods/CocoaPods/pull/9687)
121
+
122
+ * Do not clean user projects from sandbox.
123
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
124
+ [#9683](https://github.com/CocoaPods/CocoaPods/pull/9683)
125
+
126
+ * Fix mapping of resource paths for app specs.
127
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
128
+ [#9676](https://github.com/CocoaPods/CocoaPods/pull/9676)
129
+
130
+ * When preserving pod paths, preserve ALL the paths
131
+ [Igor Makarov](https://github.com/igor-makarov)
132
+ [#9483](https://github.com/CocoaPods/CocoaPods/pull/9483)
133
+
134
+ * Re-implement `dSYM` copying and stripping to avoid duplicate outputs.
135
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
136
+ [#9185](https://github.com/CocoaPods/CocoaPods/issues/9185)
137
+
138
+ * Add support for running tests through the scheme of the app spec host of a test spec
139
+ [Eric Amorde](https://github.com/amorde)
140
+ [#9332](https://github.com/CocoaPods/CocoaPods/issues/9332)
141
+
142
+ * Fix an issue that prevented variables in test bundle scheme settings from expanding
143
+ [Eric Amorde](https://github.com/amorde)
144
+ [#9539](https://github.com/CocoaPods/CocoaPods/pull/9539)
145
+
146
+ * Fix project path handling issue that caused cmake projects to be incorrect
147
+ [Paul Beusterien](https://github.com/paulb777)
148
+ [Andrew](https://github.com/mad-rain)
149
+ [#6268](https://github.com/CocoaPods/CocoaPods/pull/6268)
150
+
151
+ * Set `Missing Localizability` setting to `'YES'` to prevent warnings in Xcode 11
152
+ [Eric Amorde](https://github.com/amorde)
153
+ [#9612](https://github.com/CocoaPods/CocoaPods/pull/9612)
154
+
155
+ * Don't crash on non UTF-8 error message
156
+ [Kenji KATO](https://github.com/katoken-0215)
157
+ [#9706](https://github.com/CocoaPods/CocoaPods/pull/9706)
158
+
159
+ * Fix XCFramework slice selection when having more archs in slice than requested with $ARCHS
160
+ [jerbob92](https://github.com/jerbob92)
161
+ [#9790](https://github.com/CocoaPods/CocoaPods/pull/9790)
162
+
163
+ * Don't add app spec dependencies to the parent library's target in Xcode,
164
+ which was happening when the dependency's project was not being regenerated
165
+ due to incremental installation.
166
+ [segiddins][https://github.com/segiddins]
167
+
168
+ * Add the trunk repo to the default `sources` for the `repo push` command
169
+ [Elf Sundae](https://github.com/ElfSundae)
170
+ [#9840](https://github.com/CocoaPods/CocoaPods/pull/9840)
171
+
7
172
  ## 1.9.3 (2020-05-29)
8
173
 
9
174
  ##### Enhancements
@@ -30,8 +195,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
30
195
 
31
196
  ##### Enhancements
32
197
 
33
- * None.
34
-
35
198
  ##### Bug Fixes
36
199
 
37
200
  * Apply correct `SYSTEM_FRAMEWORK_SEARCH_PATHS` for `XCTUnwrap` fix.
@@ -57,13 +220,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
57
220
 
58
221
  * Also apply Xcode 11 `XCTUnwrap` fix to library and framework targets that weakly link `XCTest`.
59
222
  [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
60
- [#9518](https://github.com/CocoaPods/CocoaPods/pull/9518)
61
-
223
+ [#9518](https://github.com/CocoaPods/CocoaPods/pull/9518)
224
+
62
225
  * Fix dSYM handling for XCFrameworks.
63
226
  [Eric Amorde](https://github.com/amorde)
64
227
  [#9530](https://github.com/CocoaPods/CocoaPods/issues/9530)
65
228
 
66
-
67
229
  ## 1.9.0.beta.3 (2020-02-04)
68
230
 
69
231
  ##### Enhancements
data/README.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods)
6
6
  [![Gem Version](http://img.shields.io/gem/v/cocoapods.svg?style=flat)](http://badge.fury.io/rb/cocoapods)
7
- [![Code Climate](http://img.shields.io/codeclimate/github/CocoaPods/CocoaPods.svg?style=flat)](https://codeclimate.com/github/CocoaPods/CocoaPods)
7
+ [![Maintainability](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/maintainability)](https://codeclimate.com/github/CocoaPods/CocoaPods/maintainability)
8
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/test_coverage)](https://codeclimate.com/github/CocoaPods/CocoaPods/test_coverage)
8
9
 
9
10
  CocoaPods manages dependencies for your Xcode projects.
10
11
 
@@ -59,10 +59,12 @@ module Pod
59
59
  autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
60
60
  autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
61
61
  autoload :Constant, 'cocoapods/generator/constant'
62
+ autoload :ScriptPhaseConstants, 'cocoapods/generator/script_phase_constants'
62
63
  autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
64
+ autoload :CopydSYMsScript, 'cocoapods/generator/copy_dsyms_script'
63
65
  autoload :DummySource, 'cocoapods/generator/dummy_source'
64
66
  autoload :EmbedFrameworksScript, 'cocoapods/generator/embed_frameworks_script'
65
- autoload :PrepareArtifactsScript, 'cocoapods/generator/prepare_artifacts_script'
67
+ autoload :CopyXCFrameworksScript, 'cocoapods/generator/copy_xcframework_script'
66
68
  autoload :FileList, 'cocoapods/generator/file_list'
67
69
  autoload :Header, 'cocoapods/generator/header'
68
70
  autoload :InfoPlistFile, 'cocoapods/generator/info_plist_file'
@@ -39,13 +39,13 @@ module Pod
39
39
 
40
40
  def self.options
41
41
  [
42
+ ['--allow-root', 'Allows CocoaPods to run as root'],
42
43
  ['--silent', 'Show nothing'],
43
44
  ].concat(super)
44
45
  end
45
46
 
46
47
  def self.run(argv)
47
- help! 'You cannot run CocoaPods as root.' if Process.uid == 0 && !Gem.win_platform?
48
-
48
+ ensure_not_root_or_allowed! argv
49
49
  verify_minimum_git_version!
50
50
  verify_xcode_license_approved!
51
51
 
@@ -85,6 +85,7 @@ module Pod
85
85
  def initialize(argv)
86
86
  super
87
87
  config.silent = argv.flag?('silent', config.silent)
88
+ config.allow_root = argv.flag?('allow-root', config.allow_root)
88
89
  config.verbose = self.verbose? unless verbose.nil?
89
90
  unless self.ansi_output?
90
91
  Colored2.disable!
@@ -92,6 +93,15 @@ module Pod
92
93
  end
93
94
  end
94
95
 
96
+ # Ensure root user
97
+ #
98
+ # @return [void]
99
+ #
100
+ def self.ensure_not_root_or_allowed!(argv, uid = Process.uid, is_windows = Gem.win_platform?)
101
+ root_allowed = argv.include?('--allow-root') || !ENV['COCOAPODS_ALLOW_ROOT'].nil?
102
+ help! 'You cannot run CocoaPods as root.' unless root_allowed || uid != 0 || is_windows
103
+ end
104
+
95
105
  # Ensure that the master spec repo exists
96
106
  #
97
107
  # @return [void]
@@ -22,6 +22,7 @@ module Pod
22
22
  ['--fail-fast', 'Lint stops on the first failing platform or subspec'],
23
23
  ['--use-libraries', 'Lint uses static libraries to install the spec'],
24
24
  ['--use-modular-headers', 'Lint uses modular headers during installation'],
25
+ ['--use-static-frameworks', 'Lint uses static frameworks during installation'],
25
26
  ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
26
27
  "(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
27
28
  ['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
@@ -34,7 +35,9 @@ module Pod
34
35
  'via :podspec. If there are --include-podspecs, then these are removed from them'],
35
36
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
36
37
  ['--skip-tests', 'Lint skips building and running tests during validation'],
38
+ ['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
37
39
  ['--analyze', 'Validate with the Xcode Static Analysis tool'],
40
+ ['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
38
41
  ].concat(super)
39
42
  end
40
43
 
@@ -47,6 +50,7 @@ module Pod
47
50
  @only_subspec = argv.option('subspec')
48
51
  @use_frameworks = !argv.flag?('use-libraries')
49
52
  @use_modular_headers = argv.flag?('use-modular-headers')
53
+ @use_static_frameworks = argv.flag?('use-static-frameworks')
50
54
  @source_urls = argv.option('sources', Pod::TrunkSource::TRUNK_REPO_URL).split(',')
51
55
  @platforms = argv.option('platforms', '').split(',')
52
56
  @private = argv.flag?('private', false)
@@ -54,9 +58,11 @@ module Pod
54
58
  @include_podspecs = argv.option('include-podspecs', nil)
55
59
  @external_podspecs = argv.option('external-podspecs', nil)
56
60
  @skip_import_validation = argv.flag?('skip-import-validation', false)
57
- @skip_tests = argv.flag?('skip-tests', false)
58
- @analyze = argv.flag?('analyze', false)
59
- @podspecs_paths = argv.arguments!
61
+ @skip_tests = argv.flag?('skip-tests', false)
62
+ @test_specs = argv.option('test-specs', nil)&.split(',')
63
+ @analyze = argv.flag?('analyze', false)
64
+ @podspecs_paths = argv.arguments!
65
+ @configuration = argv.option('configuration', nil)
60
66
  super
61
67
  end
62
68
 
@@ -77,13 +83,16 @@ module Pod
77
83
  validator.only_subspec = @only_subspec
78
84
  validator.use_frameworks = @use_frameworks
79
85
  validator.use_modular_headers = @use_modular_headers
86
+ validator.use_static_frameworks = @use_static_frameworks
80
87
  validator.ignore_public_only_results = @private
81
88
  validator.swift_version = @swift_version
82
89
  validator.skip_import_validation = @skip_import_validation
83
90
  validator.skip_tests = @skip_tests
91
+ validator.test_specs = @test_specs
84
92
  validator.analyze = @analyze
85
93
  validator.include_podspecs = @include_podspecs
86
94
  validator.external_podspecs = @external_podspecs
95
+ validator.configuration = @configuration
87
96
  validator.validate
88
97
 
89
98
  unless @clean
@@ -45,7 +45,7 @@ module Pod
45
45
  @local_only = argv.flag?('local-only')
46
46
  @repo = argv.shift_argument
47
47
  @source = source_for_repo
48
- @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',')
48
+ @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',')
49
49
  @podspec = argv.shift_argument
50
50
  @use_frameworks = !argv.flag?('use-libraries')
51
51
  @use_modular_headers = argv.flag?('use-modular-headers', false)
@@ -21,6 +21,17 @@ module Pod
21
21
  def run
22
22
  show_output = !config.silent?
23
23
  config.sources_manager.update(@name, show_output)
24
+ exclude_repos_dir_from_backup
25
+ end
26
+
27
+ private
28
+
29
+ # Excludes the repos directory from backups.
30
+ #
31
+ # @return [void]
32
+ #
33
+ def exclude_repos_dir_from_backup
34
+ config.exclude_from_backup(config.repos_dir)
24
35
  end
25
36
  end
26
37
  end
@@ -24,6 +24,7 @@ module Pod
24
24
  ['--fail-fast', 'Lint stops on the first failing platform or subspec'],
25
25
  ['--use-libraries', 'Lint uses static libraries to install the spec'],
26
26
  ['--use-modular-headers', 'Lint uses modular headers during installation'],
27
+ ['--use-static-frameworks', 'Lint uses static frameworks during installation'],
27
28
  ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
28
29
  "(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
29
30
  ['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
@@ -33,7 +34,9 @@ module Pod
33
34
  'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file'],
34
35
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
35
36
  ['--skip-tests', 'Lint skips building and running tests during validation'],
37
+ ['--test-specs=test-spec1,test-spec2,etc', 'List of test specs to run'],
36
38
  ['--analyze', 'Validate with the Xcode Static Analysis tool'],
39
+ ['--configuration=CONFIGURATION', 'Build using the given configuration (defaults to Release)'],
37
40
  ].concat(super)
38
41
  end
39
42
 
@@ -46,14 +49,17 @@ module Pod
46
49
  @only_subspec = argv.option('subspec')
47
50
  @use_frameworks = !argv.flag?('use-libraries')
48
51
  @use_modular_headers = argv.flag?('use-modular-headers')
52
+ @use_static_frameworks = argv.flag?('use-static-frameworks')
49
53
  @source_urls = argv.option('sources', Pod::TrunkSource::TRUNK_REPO_URL).split(',')
50
54
  @platforms = argv.option('platforms', '').split(',')
51
55
  @private = argv.flag?('private', false)
52
56
  @swift_version = argv.option('swift-version', nil)
53
57
  @skip_import_validation = argv.flag?('skip-import-validation', false)
54
- @skip_tests = argv.flag?('skip-tests', false)
55
- @analyze = argv.flag?('analyze', false)
56
- @podspecs_paths = argv.arguments!
58
+ @skip_tests = argv.flag?('skip-tests', false)
59
+ @test_specs = argv.option('test-specs', nil)&.split(',')
60
+ @analyze = argv.flag?('analyze', false)
61
+ @podspecs_paths = argv.arguments!
62
+ @configuration = argv.option('configuration', nil)
57
63
  super
58
64
  end
59
65
 
@@ -70,11 +76,14 @@ module Pod
70
76
  validator.only_subspec = @only_subspec
71
77
  validator.use_frameworks = @use_frameworks
72
78
  validator.use_modular_headers = @use_modular_headers
79
+ validator.use_static_frameworks = @use_static_frameworks
73
80
  validator.ignore_public_only_results = @private
74
81
  validator.swift_version = @swift_version
75
82
  validator.skip_import_validation = @skip_import_validation
76
83
  validator.skip_tests = @skip_tests
84
+ validator.test_specs = @test_specs
77
85
  validator.analyze = @analyze
86
+ validator.configuration = @configuration
78
87
  validator.validate
79
88
  failure_reasons << validator.failure_reason
80
89
 
@@ -60,6 +60,11 @@ module Pod
60
60
  attr_accessor :silent
61
61
  alias_method :silent?, :silent
62
62
 
63
+ # @return [Bool] Whether CocoaPods is allowed to run as root.
64
+ #
65
+ attr_accessor :allow_root
66
+ alias_method :allow_root?, :allow_root
67
+
63
68
  # @return [Bool] Whether a message should be printed when a new version of
64
69
  # CocoaPods is available.
65
70
  #
@@ -314,6 +319,18 @@ module Pod
314
319
  nil
315
320
  end
316
321
 
322
+ # Excludes the given dir from Time Machine backups.
323
+ #
324
+ # @param [Pathname] dir
325
+ # The directory to exclude from Time Machine backups.
326
+ #
327
+ # @return [void]
328
+ #
329
+ def exclude_from_backup(dir)
330
+ return if Gem.win_platform?
331
+ system('tmutil', 'addexclusion', dir.to_s, %i(out err) => File::NULL)
332
+ end
333
+
317
334
  public
318
335
 
319
336
  #-------------------------------------------------------------------------#
@@ -97,7 +97,7 @@ module Pod
97
97
  # `request`.
98
98
  #
99
99
  def path_for_pod(request, slug_opts = {})
100
- root + request.slug(slug_opts)
100
+ root + request.slug(**slug_opts)
101
101
  end
102
102
 
103
103
  # @param [Request] request
@@ -111,7 +111,7 @@ module Pod
111
111
  # `request`.
112
112
  #
113
113
  def path_for_spec(request, slug_opts = {})
114
- path = root + 'Specs' + request.slug(slug_opts)
114
+ path = root + 'Specs' + request.slug(**slug_opts)
115
115
  path.sub_ext('.podspec.json')
116
116
  end
117
117