cocoapods 1.10.0.rc.1 → 1.11.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +237 -4
  3. data/README.md +11 -11
  4. data/lib/cocoapods/command/outdated.rb +12 -1
  5. data/lib/cocoapods/command/repo/push.rb +17 -0
  6. data/lib/cocoapods/command/spec.rb +18 -9
  7. data/lib/cocoapods/command/spec/cat.rb +3 -1
  8. data/lib/cocoapods/command/spec/lint.rb +1 -1
  9. data/lib/cocoapods/command/spec/which.rb +3 -1
  10. data/lib/cocoapods/config.rb +1 -1
  11. data/lib/cocoapods/downloader.rb +4 -2
  12. data/lib/cocoapods/downloader/cache.rb +95 -6
  13. data/lib/cocoapods/external_sources/podspec_source.rb +1 -1
  14. data/lib/cocoapods/gem_version.rb +1 -1
  15. data/lib/cocoapods/generator/acknowledgements.rb +1 -1
  16. data/lib/cocoapods/generator/app_target_helper.rb +7 -3
  17. data/lib/cocoapods/generator/copy_dsyms_script.rb +4 -4
  18. data/lib/cocoapods/generator/copy_xcframework_script.rb +4 -29
  19. data/lib/cocoapods/generator/embed_frameworks_script.rb +2 -1
  20. data/lib/cocoapods/generator/script_phase_constants.rb +1 -0
  21. data/lib/cocoapods/installer.rb +52 -4
  22. data/lib/cocoapods/installer/analyzer.rb +12 -8
  23. data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +31 -4
  24. data/lib/cocoapods/installer/podfile_validator.rb +2 -2
  25. data/lib/cocoapods/installer/pre_integrate_hooks_context.rb +9 -0
  26. data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +9 -2
  27. data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +15 -2
  28. data/lib/cocoapods/installer/project_cache/target_cache_key.rb +3 -3
  29. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +106 -5
  30. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +1 -1
  31. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +15 -4
  32. data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +25 -6
  33. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +6 -19
  34. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +75 -59
  35. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +48 -6
  36. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +2 -2
  37. data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb +2 -5
  38. data/lib/cocoapods/resolver.rb +4 -4
  39. data/lib/cocoapods/sandbox/file_accessor.rb +51 -10
  40. data/lib/cocoapods/sandbox/headers_store.rb +3 -1
  41. data/lib/cocoapods/sandbox/path_list.rb +1 -1
  42. data/lib/cocoapods/sandbox/pod_dir_cleaner.rb +1 -1
  43. data/lib/cocoapods/sources_manager.rb +14 -8
  44. data/lib/cocoapods/target.rb +1 -1
  45. data/lib/cocoapods/target/aggregate_target.rb +23 -1
  46. data/lib/cocoapods/target/build_settings.rb +56 -22
  47. data/lib/cocoapods/target/pod_target.rb +47 -22
  48. data/lib/cocoapods/user_interface.rb +4 -0
  49. data/lib/cocoapods/validator.rb +25 -5
  50. data/lib/cocoapods/version_metadata.rb +1 -1
  51. data/lib/cocoapods/xcode/xcframework.rb +8 -3
  52. data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +10 -1
  53. metadata +28 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b610fca17dbffb7ed6c959cd5f43bd0ddbf0c2c9b91bb19b03ecf5353804f1a
4
- data.tar.gz: 6bb43720da1072c1824b2dfcc3735ccdd11eba2845ef8be9cb6caf00b47ef6b0
3
+ metadata.gz: 9fcadf827e9027cd39852af93dcf24362edbb7079702070590bd5aee2358f6aa
4
+ data.tar.gz: 1f097f852a1037fa1eb692387373a3ba6d198310d10bf1203cb8ebfbff44f540
5
5
  SHA512:
6
- metadata.gz: 83a7c0f693ec49044e4766fa0f427a663358bf1c6346fd366d133a60b70d559209a215c019198593210919f2e42fefda4cff0747384ece6c08a75a9489e491d1
7
- data.tar.gz: 945634e14120c0deda48a9ce2397fd77b307f2376ffff84f33162fa73324002776b022833180e4d65e9b3638c7a90d2c1c1891557988e1fd471a65dfe1d9d61a
6
+ metadata.gz: df4609fa035e9a2d0b0665ce69291d7733e8ded721842985c1a996015f28bdb87cc952017c5fcc7fe990f6a5c9c99f23b952c48536f96e0d18f6b879800b6a3e
7
+ data.tar.gz: 4e7dd86c41aad6d81b78be0f760cae0866780e30c4bd37b7386ce517ebe6aaa8d3d73388387ec467ebd75b4ad5fbaa4847e9b3cd6ddc12dbf9901025b1bb4a3d
data/CHANGELOG.md CHANGED
@@ -4,6 +4,240 @@ To install or update CocoaPods see this [guide](https://guides.cocoapods.org/usi
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.11.0.beta.1 (2021-08-09)
8
+
9
+ ##### Enhancements
10
+
11
+ * Add support for integrating on demand resources.
12
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
13
+ [JunyiXie](https://github.com/JunyiXie)
14
+ [#9606](https://github.com/CocoaPods/CocoaPods/issues/9606)
15
+ [#10845](https://github.com/CocoaPods/CocoaPods/pull/10845)
16
+
17
+ * Integrate `project_header_files` specified by specs.
18
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
19
+ [#9820](https://github.com/CocoaPods/CocoaPods/issues/9820)
20
+
21
+ * Mark RealityComposer-projects (`.rcproject`) files defined in resources for compilation.
22
+ [Hendrik von Prince](https://github.com/parallaxe)
23
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
24
+ [#10793](https://github.com/CocoaPods/CocoaPods/pull/10793)
25
+
26
+ * Integrate test specs and app specs of pre-built pods.
27
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
28
+ [#10795](https://github.com/CocoaPods/CocoaPods/pull/10795)
29
+
30
+ * Add support for `before_headers` and `after_headers` script phase DSL.
31
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
32
+ [#10770](https://github.com/CocoaPods/CocoaPods/issues/10770)
33
+
34
+ * Fix touch on a missing directory for dSYM copy phase script.
35
+ [alvarollmenezes](https://github.com/alvarollmenezes)
36
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
37
+ [#10488](https://github.com/CocoaPods/CocoaPods/issues/10488)
38
+
39
+ * Check the podfile sources and plugin sources when printing warnings without explicitly using the master source.
40
+ [gonghonglou](https://github.com/gonghonglou)
41
+ [#10764](https://github.com/CocoaPods/CocoaPods/pull/10764)
42
+
43
+ * Use relative paths in copy dsyms script.
44
+ [Mickey Knox](https://github.com/knox)
45
+ [#10583](https://github.com/CocoaPods/CocoaPods/pull/10583)
46
+
47
+ * Use `OpenURI.open_uri` instead.
48
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
49
+ [#10597](https://github.com/CocoaPods/CocoaPods/issues/10597)
50
+
51
+ * Set minimum supported Ruby version to 2.6.
52
+ [Igor Makarov](https://github.com/igor-makarov)
53
+ [#10412](https://github.com/CocoaPods/CocoaPods/pull/10412)
54
+
55
+ * Improve compatibility with ActiveSupport 6
56
+ [Jun Jiang](https://github.com/jasl)
57
+ [#10364](https://github.com/CocoaPods/CocoaPods/pull/10364)
58
+
59
+ * Add a `pre_integrate_hook` API
60
+ [dcvz](https://github.com/dcvz)
61
+ [#9935](https://github.com/CocoaPods/CocoaPods/pull/9935)
62
+
63
+ * Rewrite the only place dependent on `typhoeus`.
64
+ [Jun Jiang](https://github.com/jasl), [Igor Makarov](https://github.com/igor-makarov)
65
+ [#10346](https://github.com/CocoaPods/CocoaPods/pull/10346)
66
+
67
+ * Add a `--update-sources` option to `pod repo push` so one can ensure sources are up-to-date.
68
+ [Elton Gao](https://github.com/gyfelton)
69
+ [Justin Martin](https://github.com/justinseanmartin)
70
+
71
+ * Installing a local (`:path`) pod that defines script phases will no longer
72
+ produce warnings.
73
+ [Samuel Giddins](https://github.com/segiddins)
74
+
75
+ * Allow building app & test spec targets that depend on a library that uses
76
+ Swift without requiring an empty Swift file be present.
77
+ [Samuel Giddins](https://github.com/segiddins)
78
+
79
+ * Add flag to ignore prerelease versions when reporting latest version for outdated pods.
80
+ [cltnschlosser](https://github.com/cltnschlosser)
81
+ [#9916](https://github.com/CocoaPods/CocoaPods/pull/9916)
82
+
83
+ * Add possibility to skip modulemap generation
84
+ [till0xff](https://github.com/till0xff)
85
+ [#10235](https://github.com/CocoaPods/CocoaPods/issues/10235)
86
+
87
+ * Add a `--version` option to `pod spec cat` and `pod spec which` for listing the podspec of a specific version
88
+ [pietbrauer](https://github.com/pietbrauer)
89
+ [#10609](https://github.com/CocoaPods/CocoaPods/pull/10609)
90
+
91
+ ##### Bug Fixes
92
+
93
+ * Fix resource variant groups in static frameworks
94
+ [Igor Makarov](https://github.com/igor-makarov)
95
+ [#10834](https://github.com/CocoaPods/CocoaPods/pull/10834)
96
+ [#10605](https://github.com/CocoaPods/CocoaPods/issues/10605)
97
+
98
+ * Fix adding embed frameworks script phase to unit test targets if xcframeworks are present.
99
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
100
+ [#10652](https://github.com/CocoaPods/CocoaPods/issues/10652)
101
+
102
+ * Remove unused `install_xcframework_library` code.
103
+ [Gio Lodi](https://github.com/mokagio)
104
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
105
+ [#10831](https://github.com/CocoaPods/CocoaPods/pull/10831)
106
+
107
+ * Validate vendored library names after they have been expanded.
108
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
109
+ [#10832](https://github.com/CocoaPods/CocoaPods/pull/10832)
110
+
111
+ * Place frameworks from xcframeworks into a unique folder name to avoid duplicate outputs.
112
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
113
+ [#10106](https://github.com/CocoaPods/CocoaPods/issues/10106)
114
+
115
+ * Update pod in Pods folder when changing the pod from branch to version in Podfie.
116
+ [gonghonglou](https://github.com/gonghonglou)
117
+ [#10825](https://github.com/CocoaPods/CocoaPods/pull/10825)
118
+
119
+ * Bump addressable dependency to 2.8.
120
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
121
+ [#10802](https://github.com/CocoaPods/CocoaPods/issues/10802)
122
+
123
+ * Dedup bcsymbolmap paths found from multiple vendored frameworks.
124
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
125
+ [#10373](https://github.com/CocoaPods/CocoaPods/issues/10373)
126
+
127
+ * Correctly filter dependencies for pod variants across different platforms.
128
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
129
+ [#10777](https://github.com/CocoaPods/CocoaPods/issues/10777)
130
+
131
+ * Generate default `Info.plist` for consumer app during validation.
132
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
133
+ [#8570](https://github.com/CocoaPods/CocoaPods/issues/8570)
134
+
135
+ * Fix lint subspec error when the name of subspec start with the pod name.
136
+ [XianpuMeng](https://github.com/XianpuMeng)
137
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
138
+ [#9906](https://github.com/CocoaPods/CocoaPods/issues/9906)
139
+
140
+ * Update `ruby-macho` gem version to support 1.x and 2.x.
141
+ [Eric Chamberlain](https://github.com/PeqNP)
142
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
143
+ [#10390](https://github.com/CocoaPods/CocoaPods/issues/10390)
144
+
145
+ * Respect `--configuration` option when analyzing via `pod lib lint --analyze`.
146
+ [Jenn Magder](https://github.com/jmagman)
147
+ [#10476](https://github.com/CocoaPods/CocoaPods/issues/10476)
148
+
149
+ * Do not add dependencies to 'Link Binary With Libraries' phase.
150
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
151
+ [#10133](https://github.com/CocoaPods/CocoaPods/pull/10133)
152
+
153
+ * Ensure cache integrity on concurrent installations.
154
+ [Erik Blomqvist](https://github.com/codiophile)
155
+ [#10013](https://github.com/CocoaPods/CocoaPods/issues/10013)
156
+
157
+ * Force a clean install if installation options change.
158
+ [Sebastian Shanus](https://github.com/sebastianv1)
159
+ [#10016](https://github.com/CocoaPods/CocoaPods/pull/10016)
160
+
161
+ * Correctly detect that a prebuilt pod uses Swift.
162
+ [Elton Gao](https://github.com/gyfelton)
163
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
164
+ [#8649](https://github.com/CocoaPods/CocoaPods/issues/8649)
165
+
166
+ * fix: ensure cached spec path uniq
167
+ [SolaWing](https://github.com/SolaWing)
168
+ [#10231](https://github.com/CocoaPods/CocoaPods/issues/10231)
169
+
170
+ * Set `knownRegions` on generated projects with localized resources to prevent Xcode from re-saving projects to disk.
171
+ [Eric Amorde](https://github.com/amorde)
172
+ [#10290](https://github.com/CocoaPods/CocoaPods/pull/10290)
173
+
174
+ * Serialize schemes that do not need to be rewritten by Xcode.
175
+ [Samuel Giddins](https://github.com/segiddins)
176
+
177
+
178
+ ## 1.10.2 (2021-07-28)
179
+
180
+ ##### Enhancements
181
+
182
+ * None.
183
+
184
+ ##### Bug Fixes
185
+
186
+ * Fix errors when archiving a Catalyst app which depends on a pod which uses `header_mappings_dir`.
187
+ [Thomas Goyne](https://github.com/tgoyne)
188
+ [#10224](https://github.com/CocoaPods/CocoaPods/pull/10224)
189
+
190
+ * Fix missing `-ObjC` for static XCFrameworks - take 2
191
+ [Paul Beusterien](https://github.com/paulb777)
192
+ [#10459](https://github.com/CocoaPods/CocoaPods/issuess/10459)
193
+
194
+ * Change URL validation failure to a note
195
+ [Paul Beusterien](https://github.com/paulb777)
196
+ [#10291](https://github.com/CocoaPods/CocoaPods/issues/10291)
197
+
198
+
199
+ ## 1.10.1 (2021-01-07)
200
+
201
+ ##### Enhancements
202
+
203
+ * None.
204
+
205
+ ##### Bug Fixes
206
+
207
+ * Fix library name in LD `-l` flags for XCFrameworks containing libraries
208
+ [Wes Campaigne](https://github.com/Westacular)
209
+ [#10165](https://github.com/CocoaPods/CocoaPods/issues/10165)
210
+
211
+ * Fix file extension replacement for resource paths when using static frameworks.
212
+ [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
213
+ [#10206](https://github.com/CocoaPods/CocoaPods/issues/10206)
214
+
215
+ * Fix processing of xcassets resources when pod target is static framework
216
+ [Federico Trimboli](https://github.com/fedetrim)
217
+ [#10175](https://github.com/CocoaPods/CocoaPods/pull/10175)
218
+ [#10170](https://github.com/CocoaPods/CocoaPods/issues/10170)
219
+
220
+ * Fix missing `-ObjC` for static XCFrameworks
221
+ [Paul Beusterien](https://github.com/paulb777)
222
+ [#10234](https://github.com/CocoaPods/CocoaPods/pull/10234)
223
+
224
+
225
+ ## 1.10.0 (2020-10-20)
226
+
227
+ ##### Enhancements
228
+
229
+ * None.
230
+
231
+ ##### Bug Fixes
232
+
233
+ * Generate the correct LD `-l` flags for XCFrameworks containing libraries
234
+ [Wes Campaigne](https://github.com/Westacular)
235
+ [#10071](https://github.com/CocoaPods/CocoaPods/issues/10071)
236
+
237
+ * Add support for automatically embedding XCFramework debug symbols for XCFrameworks generated with Xcode 12
238
+ [johntmcintosh](https://github.com/johntmcintosh)
239
+ [#10111](https://github.com/CocoaPods/CocoaPods/issues/10111)
240
+
7
241
  ## 1.10.0.rc.1 (2020-09-15)
8
242
 
9
243
  ##### Enhancements
@@ -75,12 +309,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
75
309
  [Gereon Steffens](https://github.com/gereons)
76
310
  [#9686](https://github.com/CocoaPods/CocoaPods/issues/9686)
77
311
 
78
- * Add a post_integrate_hook API
312
+ * Add a `post_integrate_hook` API
79
313
  [lucasmpaim](https://github.com/lucasmpaim)
80
314
  [#7432](https://github.com/CocoaPods/CocoaPods/issues/7432)
81
315
 
82
- * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with
83
- a target that has the setting set to `YES` (directly or in an .xcconfig).
316
+ * Set the `BUILD_LIBRARY_FOR_DISTRIBUTION` build setting if integrating with a target that has the setting set to `YES`.
84
317
  [Juanjo López](https://github.com/juanjonol)
85
318
  [#9232](https://github.com/CocoaPods/CocoaPods/issues/9232)
86
319
 
@@ -88,7 +321,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
88
321
  [Paul Beusterien](https://github.com/paulb777)
89
322
  [#9392](https://github.com/CocoaPods/CocoaPods/pull/9392)
90
323
 
91
- * Add --use-static-frameworks lint option
324
+ * Add `--use-static-frameworks` lint option
92
325
  [Paul Beusterien](https://github.com/paulb777)
93
326
  [#9632](https://github.com/CocoaPods/CocoaPods/pull/9632)
94
327
 
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ### CocoaPods: The Cocoa dependency manager
4
4
 
5
- [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods)
6
- [![Gem Version](http://img.shields.io/gem/v/cocoapods.svg?style=flat)](http://badge.fury.io/rb/cocoapods)
5
+ [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods/Specs)](https://github.com/CocoaPods/CocoaPods/actions)
6
+ [![Gem Version](https://img.shields.io/gem/v/cocoapods)](https://rubygems.org/gems/cocoapods)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/maintainability)](https://codeclimate.com/github/CocoaPods/CocoaPods/maintainability)
8
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/8f0fe544baf2ae1acc2b/test_coverage)](https://codeclimate.com/github/CocoaPods/CocoaPods/test_coverage)
9
9
 
@@ -70,13 +70,13 @@ contributor [code of conduct](CODE_OF_CONDUCT.md).
70
70
 
71
71
  CocoaPods is composed of the following projects:
72
72
 
73
- | Status | Project | Description | Info |
74
- | :----- | :------ | :--- | :--- |
75
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
76
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Core/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Core) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](https://guides.cocoapods.org/contributing/components.html)
77
- | [![Build Status](http://img.shields.io/travis/CocoaPods/cocoapods-downloader/master.svg?style=flat)](https://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](https://www.rubydoc.info/gems/cocoapods-downloader)
78
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](https://www.rubydoc.info/gems/xcodeproj)
79
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CLAide/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](https://www.rubydoc.info/gems/claide)
80
- | [![Build Status](http://img.shields.io/travis/CocoaPods/Molinillo/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
81
- | [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
73
+ | Status | Project | Description | Info |
74
+ | :-------- | :------ | :--- | :--- |
75
+ | [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/CocoaPods/Specs)](https://github.com/CocoaPods/CocoaPods/actions) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
76
+ | [![Build Status](https://img.shields.io/github/workflow/status/CocoaPods/Core/Specs)](https://github.com/CocoaPods/Core/actions) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](https://guides.cocoapods.org/contributing/components.html)
77
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/cocoapods-downloader/master.svg?style=flat)](https://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](https://www.rubydoc.info/gems/cocoapods-downloader)
78
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](https://www.rubydoc.info/gems/xcodeproj)
79
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/CLAide/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](https://www.rubydoc.info/gems/claide)
80
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/Molinillo/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
81
+ | [![Build Status](https://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
82
82
  | | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guides](https://guides.cocoapods.org/making/specs-and-specs-repo.html)
@@ -11,6 +11,17 @@ module Pod
11
11
  spec repos, not those from local/external sources.
12
12
  DESC
13
13
 
14
+ def self.options
15
+ [
16
+ ['--ignore-prerelease', "Don't consider prerelease versions to be updates"],
17
+ ].concat(super)
18
+ end
19
+
20
+ def initialize(argv)
21
+ @ignore_prerelease = argv.flag?('ignore-prerelease')
22
+ super
23
+ end
24
+
14
25
  # Run the command
15
26
  #
16
27
  def run
@@ -67,7 +78,7 @@ module Pod
67
78
  ensure_external_podspecs_present!
68
79
  spec_sets.map do |set|
69
80
  spec = set.specification
70
- source_version = set.versions.first
81
+ source_version = set.versions.find { |version| !@ignore_prerelease || !version.prerelease? }
71
82
  pod_name = spec.root.name
72
83
  lockfile_version = lockfile.version(pod_name)
73
84
  if source_version > lockfile_version
@@ -37,6 +37,7 @@ module Pod
37
37
  ['--swift-version=VERSION', 'The `SWIFT_VERSION` that should be used when linting the spec. ' \
38
38
  'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file'],
39
39
  ['--no-overwrite', 'Disallow pushing that would overwrite an existing spec'],
40
+ ['--update-sources', 'Make sure sources are up-to-date before a push'],
40
41
  ].concat(super)
41
42
  end
42
43
 
@@ -46,6 +47,7 @@ module Pod
46
47
  @repo = argv.shift_argument
47
48
  @source = source_for_repo
48
49
  @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',')
50
+ @update_sources = argv.flag?('update-sources')
49
51
  @podspec = argv.shift_argument
50
52
  @use_frameworks = !argv.flag?('use-libraries')
51
53
  @use_modular_headers = argv.flag?('use-modular-headers', false)
@@ -73,6 +75,7 @@ module Pod
73
75
  def run
74
76
  open_editor if @commit_message && @message.nil?
75
77
  check_if_push_allowed
78
+ update_sources if @update_sources
76
79
  validate_podspec_files
77
80
  check_repo_status
78
81
  update_repo
@@ -177,6 +180,20 @@ module Pod
177
180
  git!(%W(-C #{repo_dir} pull))
178
181
  end
179
182
 
183
+ # Update sources if present
184
+ #
185
+ # @return [void]
186
+ #
187
+ def update_sources
188
+ return if @source_urls.nil?
189
+ @source_urls.each do |source_url|
190
+ source = config.sources_manager.source_with_name_or_url(source_url)
191
+ dir = source.specs_dir
192
+ UI.puts "Updating a source at #{dir} for #{source}"
193
+ git!(%W(-C #{dir} pull))
194
+ end
195
+ end
196
+
180
197
  # Commits the podspecs to the source, which should be a git repo.
181
198
  #
182
199
  # @note The pre commit hook of the repo is skipped as the podspecs have
@@ -33,13 +33,14 @@ module Pod
33
33
  # @param [String] spec
34
34
  # The name of the specification.
35
35
  #
36
- # @param [Bool] show_all
37
- # Whether the paths for all the versions should be returned or
38
- # only the one for the last version.
36
+ # @param [Bool,String] version_filter
37
+ # - If set to false, will return only the spec path for the latest version (the default).
38
+ # - If set to true, will return a list of all paths of all the versions of that spec.
39
+ # - If set to a String, will return only the spec path for the version specified by that string.
39
40
  #
40
41
  # @return [Pathname] the absolute path or paths of the given podspec
41
42
  #
42
- def get_path_of_spec(spec, show_all = false)
43
+ def get_path_of_spec(spec, version_filter = false)
43
44
  sets = config.sources_manager.search_by_name(spec)
44
45
 
45
46
  if sets.count == 1
@@ -51,12 +52,14 @@ module Pod
51
52
  raise Informative, "More than one spec found for '#{spec}':\n#{names}"
52
53
  end
53
54
 
54
- unless show_all
55
+ if version_filter.is_a? String
56
+ all_paths_from_set(set, version_filter).split(/\n/).first
57
+ elsif version_filter == true
58
+ all_paths_from_set(set)
59
+ else
55
60
  best_spec, spec_source = spec_and_source_from_set(set)
56
- return pathname_from_spec(best_spec, spec_source)
61
+ pathname_from_spec(best_spec, spec_source)
57
62
  end
58
-
59
- all_paths_from_set(set)
60
63
  end
61
64
 
62
65
  # @return [Pathname] the absolute path of the given spec and source
@@ -67,7 +70,7 @@ module Pod
67
70
 
68
71
  # @return [String] of spec paths one on each line
69
72
  #
70
- def all_paths_from_set(set)
73
+ def all_paths_from_set(set, specific_version = nil)
71
74
  paths = ''
72
75
 
73
76
  sources = set.sources
@@ -75,12 +78,18 @@ module Pod
75
78
  sources.each do |source|
76
79
  versions = source.versions(set.name)
77
80
 
81
+ if specific_version
82
+ versions = versions.select { |v| v.version == specific_version }
83
+ end
84
+
78
85
  versions.each do |version|
79
86
  spec = source.specification(set.name, version)
80
87
  paths += "#{pathname_from_spec(spec, source)}\n"
81
88
  end
82
89
  end
83
90
 
91
+ raise Informative, "Can't find spec for #{set.name}." if paths.empty?
92
+
84
93
  paths
85
94
  end
86
95
 
@@ -16,6 +16,7 @@ module Pod
16
16
  [
17
17
  ['--regex', 'Interpret the `QUERY` as a regular expression'],
18
18
  ['--show-all', 'Pick from all versions of the given podspec'],
19
+ ['--version', 'Print a specific version of the given podspec'],
19
20
  ].concat(super)
20
21
  end
21
22
 
@@ -24,6 +25,7 @@ module Pod
24
25
  @show_all = argv.flag?('show-all')
25
26
  @query = argv.shift_argument
26
27
  @query = @query.gsub('.podspec', '') unless @query.nil?
28
+ @version = argv.option('version')
27
29
  super
28
30
  end
29
31
 
@@ -40,7 +42,7 @@ module Pod
40
42
  index = UI.choose_from_array(specs, "Which spec would you like to print [1-#{specs.count}]? ")
41
43
  specs[index]
42
44
  else
43
- get_path_of_spec(query)
45
+ get_path_of_spec(query, @version)
44
46
  end
45
47
 
46
48
  UI.puts File.read(filepath)