cocoapods 1.5.3 → 1.6.0.beta.1
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 +4 -4
- data/CHANGELOG.md +200 -0
- data/lib/cocoapods.rb +0 -1
- data/lib/cocoapods/command/init.rb +1 -1
- data/lib/cocoapods/command/install.rb +7 -0
- data/lib/cocoapods/command/lib/lint.rb +8 -1
- data/lib/cocoapods/command/outdated.rb +2 -7
- data/lib/cocoapods/command/repo/add.rb +1 -1
- data/lib/cocoapods/command/repo/list.rb +1 -1
- data/lib/cocoapods/command/repo/push.rb +17 -12
- data/lib/cocoapods/command/repo/remove.rb +1 -1
- data/lib/cocoapods/command/repo/update.rb +1 -1
- data/lib/cocoapods/command/setup.rb +1 -1
- data/lib/cocoapods/command/spec/create.rb +39 -39
- data/lib/cocoapods/command/spec/lint.rb +8 -1
- data/lib/cocoapods/config.rb +13 -2
- data/lib/cocoapods/downloader/cache.rb +1 -1
- data/lib/cocoapods/executable.rb +2 -2
- data/lib/cocoapods/external_sources.rb +7 -4
- data/lib/cocoapods/external_sources/abstract_external_source.rb +23 -13
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/acknowledgements/markdown.rb +6 -0
- data/lib/cocoapods/generator/acknowledgements/plist.rb +11 -0
- data/lib/cocoapods/generator/app_target_helper.rb +102 -16
- data/lib/cocoapods/generator/copy_resources_script.rb +6 -0
- data/lib/cocoapods/generator/dummy_source.rb +14 -5
- data/lib/cocoapods/generator/embed_frameworks_script.rb +13 -2
- data/lib/cocoapods/generator/header.rb +1 -1
- data/lib/cocoapods/generator/info_plist_file.rb +12 -4
- data/lib/cocoapods/generator/prefix_header.rb +2 -2
- data/lib/cocoapods/hooks_manager.rb +28 -17
- data/lib/cocoapods/installer.rb +103 -42
- data/lib/cocoapods/installer/analyzer.rb +362 -277
- data/lib/cocoapods/installer/analyzer/analysis_result.rb +52 -22
- data/lib/cocoapods/installer/analyzer/locking_dependency_analyzer.rb +9 -6
- data/lib/cocoapods/installer/analyzer/pod_variant.rb +4 -5
- data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +3 -14
- data/lib/cocoapods/installer/analyzer/specs_state.rb +28 -4
- data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +24 -16
- data/lib/cocoapods/installer/analyzer/target_inspector.rb +17 -11
- data/lib/cocoapods/installer/pod_source_installer.rb +31 -43
- data/lib/cocoapods/installer/post_install_hooks_context.rb +71 -46
- data/lib/cocoapods/installer/pre_install_hooks_context.rb +22 -13
- data/lib/cocoapods/installer/source_provider_hooks_context.rb +3 -1
- data/lib/cocoapods/installer/user_project_integrator.rb +0 -2
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +38 -28
- data/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb +44 -11
- data/lib/cocoapods/installer/xcode/pods_project_generator.rb +129 -119
- data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +25 -16
- data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +95 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +12 -45
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +277 -169
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +31 -24
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +93 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb +60 -69
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb +72 -0
- data/lib/cocoapods/installer/xcode/target_validator.rb +15 -9
- data/lib/cocoapods/project.rb +14 -14
- data/lib/cocoapods/resolver.rb +38 -50
- data/lib/cocoapods/sandbox.rb +22 -38
- data/lib/cocoapods/sandbox/file_accessor.rb +11 -6
- data/lib/cocoapods/sandbox/headers_store.rb +9 -8
- data/lib/cocoapods/sandbox/path_list.rb +5 -8
- data/lib/cocoapods/sources_manager.rb +1 -1
- data/lib/cocoapods/target.rb +92 -37
- data/lib/cocoapods/target/aggregate_target.rb +140 -84
- data/lib/cocoapods/target/build_settings.rb +1076 -0
- data/lib/cocoapods/target/pod_target.rb +198 -294
- data/lib/cocoapods/user_interface.rb +5 -0
- data/lib/cocoapods/validator.rb +133 -41
- metadata +18 -18
- data/lib/cocoapods/generator/xcconfig.rb +0 -13
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +0 -260
- data/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb +0 -87
- data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +0 -558
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eea82a7d50fbc9129a369914b81e1a7722de54530e1486cc14735c4984694c6a
|
4
|
+
data.tar.gz: 1c5e1381e2d5f513c380a817ba52401eb1480e5a42bf747c57d9042c651d1b0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5bb218d53e23686ffae0612f20778d6050e52a135b49a1b35c4a3922d497c5852e442a6e2df71182bb844853b3df5215c8bf9c1acc9ebf24c2078398f0037ca
|
7
|
+
data.tar.gz: 70d05ff41270cec4e2ac020c1f8c0918ae5467694fe0bcb13b230f88170fc74239e0fa89d8067277fb80b49512135b79239556de2f0f20e427cde6feb1b315a9
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,206 @@ 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.6.0.beta.1 (2018-08-16)
|
8
|
+
|
9
|
+
##### Enhancements
|
10
|
+
|
11
|
+
* Every test spec will have its own xctest bundle.
|
12
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
13
|
+
[Jenn Kaplan](https://github.com/jkap)
|
14
|
+
[#7908](https://github.com/CocoaPods/CocoaPods/pull/7908)
|
15
|
+
|
16
|
+
* Generate a separate app host per pod.
|
17
|
+
[Samuel Giddins](https://github.com/segiddins)
|
18
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
19
|
+
[#8005](https://github.com/CocoaPods/CocoaPods/pull/8005)
|
20
|
+
|
21
|
+
* Add default launch screen storyboard to test app hosts.
|
22
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
23
|
+
[#7971](https://github.com/CocoaPods/CocoaPods/pull/7971)
|
24
|
+
|
25
|
+
* Always display downloader error message.
|
26
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
27
|
+
[#7625](https://github.com/CocoaPods/CocoaPods/issues/7625)
|
28
|
+
|
29
|
+
* Warn instead of error when linting if `public_header_files` or
|
30
|
+
`private_header_files` do not match any files.
|
31
|
+
[Eric Amorde](https://github.com/amorde)
|
32
|
+
[#7427](https://github.com/CocoaPods/CocoaPods/issues/7427)
|
33
|
+
|
34
|
+
* Add `--platforms` parameter to `pod spec lint` and `pod lib lint` to specify
|
35
|
+
which platforms to lint.
|
36
|
+
[Eric Amorde](https://github.com/amorde)
|
37
|
+
[#7783](https://github.com/CocoaPods/CocoaPods/issues/7783)
|
38
|
+
|
39
|
+
* Warn if the `git://` protocol is used as the source of a pod.
|
40
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
41
|
+
[#7705](https://github.com/CocoaPods/CocoaPods/issues/7705)
|
42
|
+
|
43
|
+
* Remove all xcode project state from target objects,
|
44
|
+
improving project generation performance.
|
45
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
46
|
+
[#7610](https://github.com/CocoaPods/CocoaPods/pull/7610)
|
47
|
+
|
48
|
+
* Improve performance of Pods project generation by skipping native targets
|
49
|
+
for which dependent targets have already been added.
|
50
|
+
[Jacek Suliga](https://github.com/jmkk)
|
51
|
+
|
52
|
+
* Refactor build settings generation to perform much better on large projects.
|
53
|
+
[Samuel Giddins](https://github.com/segiddins)
|
54
|
+
|
55
|
+
* Make sure the temporary directory used to download a pod is removed,
|
56
|
+
even if an error is raised.
|
57
|
+
[augustorsouza](https://github.com/augustorsouza)
|
58
|
+
|
59
|
+
* Avoid unlocking sources on every `pod install` when there are no
|
60
|
+
plugin post-install hooks for performance reasons.
|
61
|
+
[Samuel Giddins](https://github.com/segiddins)
|
62
|
+
|
63
|
+
* Change shell script relative paths to use `${PODS_ROOT}` instead of
|
64
|
+
`${SRCROOT}/Pods`.
|
65
|
+
[Whirlwind](https://github.com/Whirlwind)
|
66
|
+
[#7878](https://github.com/CocoaPods/CocoaPods/pull/7878)
|
67
|
+
|
68
|
+
* Set the path of the Pods group in the user project.
|
69
|
+
[Whirlwind](https://github.com/Whirlwind)
|
70
|
+
[#7886](https://github.com/CocoaPods/CocoaPods/pull/7886)
|
71
|
+
[#6194](https://github.com/CocoaPods/CocoaPods/issues/6194)
|
72
|
+
|
73
|
+
* Add a `--deployment` flag to `pod install` that errors if there are any
|
74
|
+
changes to the Podfile or Lockfile.
|
75
|
+
[Samuel Giddins](https://github.com/segiddins)
|
76
|
+
|
77
|
+
* Add `--use-modular-headers` flag to the `pod spec lint`, `pod lib lint`,
|
78
|
+
and `pod repo push` commands.
|
79
|
+
[Eric Amorde](https://github.com/amorde)
|
80
|
+
[#7683](https://github.com/CocoaPods/CocoaPods/issues/7683)
|
81
|
+
|
82
|
+
##### Bug Fixes
|
83
|
+
|
84
|
+
* Scope embedded pods to their host targets by their configuration.
|
85
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
86
|
+
[#8011](https://github.com/CocoaPods/CocoaPods/issues/8011)
|
87
|
+
|
88
|
+
* Set the `SWIFT_VERSION` on resource bundle targets that contain compiled
|
89
|
+
sources and use Swift.
|
90
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
91
|
+
[#7950](https://github.com/CocoaPods/CocoaPods/issues/7950)
|
92
|
+
|
93
|
+
* Do not ignore `--no-overwrite` parameter if a commit message is specified.
|
94
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
95
|
+
[#7926](https://github.com/CocoaPods/CocoaPods/issues/7926)
|
96
|
+
|
97
|
+
* Generate `-ObjC` in `OTHER_LDFLAGS` for apps with static frameworks.
|
98
|
+
[Paul Beusterien](https://github.com/paulb777)
|
99
|
+
[#7946](https://github.com/CocoaPods/CocoaPods/pull/7946)
|
100
|
+
|
101
|
+
* Do not display that a source was changed if it uses different casing.
|
102
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
103
|
+
[#7883](https://github.com/CocoaPods/CocoaPods/pull/7883)
|
104
|
+
|
105
|
+
* Set `CURRENT_PROJECT_VERSION` for generated app host targets.
|
106
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
107
|
+
[#7825](https://github.com/CocoaPods/CocoaPods/pull/7825)
|
108
|
+
|
109
|
+
* Properly follow symlinks within macOS universal frameworks.
|
110
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
111
|
+
[#7587](https://github.com/CocoaPods/CocoaPods/issues/7587)
|
112
|
+
|
113
|
+
* Validator adds a Swift file if any of the pod targets use Swift.
|
114
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
115
|
+
[#7738](https://github.com/CocoaPods/CocoaPods/issues/7738)
|
116
|
+
|
117
|
+
* Fix `INFOPLIST_FILE` being overridden when set in a podspec's `pod_target_xcconfig`.
|
118
|
+
[Eric Amorde](https://github.com/amorde)
|
119
|
+
[#7530](https://github.com/CocoaPods/CocoaPods/issues/7530)
|
120
|
+
|
121
|
+
* Raise an error if user target `SWIFT_VERSION` is missing.
|
122
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
123
|
+
[#7770](https://github.com/CocoaPods/CocoaPods/issues/7770)
|
124
|
+
|
125
|
+
* Fix the umbrella header import path when `header_dir` is specified in the
|
126
|
+
podspec and building a static library with modular headers enabled.
|
127
|
+
[chuganzy](https://github.com/chuganzy)
|
128
|
+
[#7724](https://github.com/CocoaPods/CocoaPods/pull/7724)
|
129
|
+
|
130
|
+
* Do not symlink headers that belong to test specs.
|
131
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
132
|
+
[#7762](https://github.com/CocoaPods/CocoaPods/pull/7762)
|
133
|
+
|
134
|
+
* Do not build pod target if it only contains script phases.
|
135
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
136
|
+
[#7746](https://github.com/CocoaPods/CocoaPods/issues/7746)
|
137
|
+
|
138
|
+
* Do not try to integrate uncreated test native targets.
|
139
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
140
|
+
[#7394](https://github.com/CocoaPods/CocoaPods/issues/7394)
|
141
|
+
|
142
|
+
* Attempt to parse `SWIFT_VERSION` from xcconfig during target inspection.
|
143
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
144
|
+
[#7731](https://github.com/CocoaPods/CocoaPods/issues/7731)
|
145
|
+
|
146
|
+
* Do not crash when creating build settings for a missing user build configuration.
|
147
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
148
|
+
[#7698](https://github.com/CocoaPods/CocoaPods/pull/7698)
|
149
|
+
|
150
|
+
* Do not overwrite App host info plist when using multiple test specs.
|
151
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
152
|
+
[#7695](https://github.com/CocoaPods/CocoaPods/pull/7695)
|
153
|
+
|
154
|
+
* Do not include test dependencies' input and output paths.
|
155
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
156
|
+
[#7688](https://github.com/CocoaPods/CocoaPods/pull/7688)
|
157
|
+
|
158
|
+
* Skip test file accessors for `uses_swift?` and `should_build?` methods.
|
159
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
160
|
+
[#7671](https://github.com/CocoaPods/CocoaPods/pull/7671)
|
161
|
+
|
162
|
+
* When integrating a vendored framework while building pods as static
|
163
|
+
libraries, public headers will be found via `FRAMEWORK_SEARCH_PATHS`
|
164
|
+
instead of via the sandbox headers store.
|
165
|
+
[Samuel Giddins](https://github.com/segiddins)
|
166
|
+
|
167
|
+
* Improve performance of grouping pods by configuration.
|
168
|
+
[Samuel Giddins](https://github.com/segiddins)
|
169
|
+
|
170
|
+
* Stop linking frameworks to static libraries to avoid warnings with the new build system.
|
171
|
+
[Samuel Giddins](https://github.com/segiddins)
|
172
|
+
[#7570](https://github.com/CocoaPods/CocoaPods/pull/7570)
|
173
|
+
|
174
|
+
* Allow `EXPANDED_CODE_SIGN_IDENTITY` to be unset.
|
175
|
+
[Keith Smiley](https://github.com/keith)
|
176
|
+
[#7708](https://github.com/CocoaPods/CocoaPods/issues/7708)
|
177
|
+
|
178
|
+
* Running `pod install` with static library modules no longer causes pods to
|
179
|
+
be recompiled.
|
180
|
+
[Samuel Giddins](https://github.com/segiddins)
|
181
|
+
|
182
|
+
* A pod built as a static library linked into multiple targets will only build
|
183
|
+
as a module when all of the targets it is linked into have opted into it.
|
184
|
+
[Samuel Giddins](https://github.com/segiddins)
|
185
|
+
|
186
|
+
* Use `CP_HOME_DIR` as the base for all default directories.
|
187
|
+
[mcfedr](https://github.com/mcfedr)
|
188
|
+
[#7917](https://github.com/CocoaPods/CocoaPods/pull/7917)
|
189
|
+
|
190
|
+
* Exclude 32-bit architectures from Pod targets when the deployment target is
|
191
|
+
iOS 11.0 or higher.
|
192
|
+
[Eric Amorde](https://github.com/amorde)
|
193
|
+
[#7148](https://github.com/CocoaPods/CocoaPods/issues/7148)
|
194
|
+
|
195
|
+
* Fail gracefully when the analyzer has dependencies to fetch, but has been
|
196
|
+
told not to fetch them.
|
197
|
+
[Samuel Giddins](https://github.com/segiddins)
|
198
|
+
|
199
|
+
* Don't generate framework or resource scripts if they will not be used.
|
200
|
+
[Eric Amorde](https://github.com/amorde)
|
201
|
+
|
202
|
+
* Fix a crash when loading the `macho` gem in certain environments.
|
203
|
+
[Eric Amorde](https://github.com/amorde)
|
204
|
+
[#7867](https://github.com/CocoaPods/CocoaPods/issues/7867)
|
205
|
+
|
206
|
+
|
7
207
|
## 1.5.3 (2018-05-25)
|
8
208
|
|
9
209
|
##### Enhancements
|
data/lib/cocoapods.rb
CHANGED
@@ -66,7 +66,6 @@ module Pod
|
|
66
66
|
autoload :ModuleMap, 'cocoapods/generator/module_map'
|
67
67
|
autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
|
68
68
|
autoload :UmbrellaHeader, 'cocoapods/generator/umbrella_header'
|
69
|
-
autoload :XCConfig, 'cocoapods/generator/xcconfig'
|
70
69
|
autoload :AppTargetHelper, 'cocoapods/generator/app_target_helper'
|
71
70
|
end
|
72
71
|
|
@@ -14,7 +14,7 @@ module Pod
|
|
14
14
|
It is possible to specify a list of dependencies which will be used by
|
15
15
|
the template in the `Podfile.default` (normal targets) `Podfile.test`
|
16
16
|
(test targets) files which should be stored in the
|
17
|
-
|
17
|
+
`#{Config.instance.templates_dir}` folder.
|
18
18
|
DESC
|
19
19
|
self.arguments = [
|
20
20
|
CLAide::Argument.new('XCODEPROJ', :false),
|
@@ -30,14 +30,21 @@ module Pod
|
|
30
30
|
def self.options
|
31
31
|
[
|
32
32
|
['--repo-update', 'Force running `pod repo update` before install'],
|
33
|
+
['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'],
|
33
34
|
].concat(super).reject { |(name, _)| name == '--no-repo-update' }
|
34
35
|
end
|
35
36
|
|
37
|
+
def initialize(argv)
|
38
|
+
super
|
39
|
+
@deployment = argv.flag?('deployment', false)
|
40
|
+
end
|
41
|
+
|
36
42
|
def run
|
37
43
|
verify_podfile_exists!
|
38
44
|
installer = installer_for_config
|
39
45
|
installer.repo_update = repo_update?(:default => false)
|
40
46
|
installer.update = false
|
47
|
+
installer.deployment = @deployment
|
41
48
|
installer.install!
|
42
49
|
end
|
43
50
|
end
|
@@ -17,9 +17,13 @@ module Pod
|
|
17
17
|
['--no-clean', 'Lint leaves the build directory intact for inspection'],
|
18
18
|
['--fail-fast', 'Lint stops on the first failing platform or subspec'],
|
19
19
|
['--use-libraries', 'Lint uses static libraries to install the spec'],
|
20
|
+
['--use-modular-headers', 'Lint uses modular headers during installation'],
|
20
21
|
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
|
21
22
|
'(defaults to https://github.com/CocoaPods/Specs.git). ' \
|
22
23
|
'Multiple sources must be comma-delimited.'],
|
24
|
+
['--platforms=ios,macos', 'Lint against specific platforms' \
|
25
|
+
'(defaults to all platforms supported by the podspec).' \
|
26
|
+
'Multiple platforms must be comma-delimited'],
|
23
27
|
['--private', 'Lint skips checks that apply only to public specs'],
|
24
28
|
['--swift-version=VERSION', 'The SWIFT_VERSION that should be used to lint the spec. ' \
|
25
29
|
'This takes precedence over a .swift-version file.'],
|
@@ -36,7 +40,9 @@ module Pod
|
|
36
40
|
@subspecs = argv.flag?('subspecs', true)
|
37
41
|
@only_subspec = argv.option('subspec')
|
38
42
|
@use_frameworks = !argv.flag?('use-libraries')
|
43
|
+
@use_modular_headers = argv.flag?('use-modular-headers')
|
39
44
|
@source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
|
45
|
+
@platforms = argv.option('platforms', '').split(',')
|
40
46
|
@private = argv.flag?('private', false)
|
41
47
|
@swift_version = argv.option('swift-version', nil)
|
42
48
|
@skip_import_validation = argv.flag?('skip-import-validation', false)
|
@@ -52,7 +58,7 @@ module Pod
|
|
52
58
|
def run
|
53
59
|
UI.puts
|
54
60
|
podspecs_to_lint.each do |podspec|
|
55
|
-
validator = Validator.new(podspec, @source_urls)
|
61
|
+
validator = Validator.new(podspec, @source_urls, @platforms)
|
56
62
|
validator.local = true
|
57
63
|
validator.quick = @quick
|
58
64
|
validator.no_clean = !@clean
|
@@ -61,6 +67,7 @@ module Pod
|
|
61
67
|
validator.no_subspecs = !@subspecs || @only_subspec
|
62
68
|
validator.only_subspec = @only_subspec
|
63
69
|
validator.use_frameworks = @use_frameworks
|
70
|
+
validator.use_modular_headers = @use_modular_headers
|
64
71
|
validator.ignore_public_only_results = @private
|
65
72
|
validator.swift_version = @swift_version
|
66
73
|
validator.skip_import_validation = @skip_import_validation
|
@@ -13,19 +13,14 @@ module Pod
|
|
13
13
|
|
14
14
|
# Run the command
|
15
15
|
#
|
16
|
-
# @todo the command reports new dependencies added to the Podfile as
|
17
|
-
# updates.
|
18
|
-
#
|
19
|
-
# @todo fix.
|
20
|
-
#
|
21
16
|
def run
|
22
17
|
if updates.empty?
|
23
18
|
UI.puts 'No pod updates are available.'.yellow
|
24
19
|
else
|
25
20
|
UI.section 'The color indicates what happens when you run `pod update`' do
|
26
|
-
UI.puts "#{'<green>'.green}\t
|
21
|
+
UI.puts "#{'<green>'.green}\t - Will be updated to the newest version"
|
27
22
|
UI.puts "#{'<blue>'.blue}\t - Will be updated, but not to the newest version because of specified version in Podfile"
|
28
|
-
UI.puts "#{'<red>'.red}\t
|
23
|
+
UI.puts "#{'<red>'.red}\t - Will not be updated because of specified version in Podfile"
|
29
24
|
UI.puts ''
|
30
25
|
end
|
31
26
|
UI.section 'The following pod updates are available:' do
|
@@ -5,7 +5,7 @@ module Pod
|
|
5
5
|
self.summary = 'Add a spec repo'
|
6
6
|
|
7
7
|
self.description = <<-DESC
|
8
|
-
Clones `URL` in the local spec-repos directory at
|
8
|
+
Clones `URL` in the local spec-repos directory at `#{Config.instance.repos_dir}`. The
|
9
9
|
remote can later be referred to by `NAME`.
|
10
10
|
DESC
|
11
11
|
|
@@ -5,7 +5,7 @@ module Pod
|
|
5
5
|
self.summary = 'List repos'
|
6
6
|
|
7
7
|
self.description = <<-DESC
|
8
|
-
List the repos from the local spec-repos directory at
|
8
|
+
List the repos from the local spec-repos directory at `#{Config.instance.repos_dir}`.
|
9
9
|
DESC
|
10
10
|
|
11
11
|
def self.options
|
@@ -11,7 +11,7 @@ module Pod
|
|
11
11
|
self.description = <<-DESC
|
12
12
|
Validates `NAME.podspec` or `*.podspec` in the current working dir,
|
13
13
|
creates a directory and version folder for the pod in the local copy of
|
14
|
-
`REPO` (
|
14
|
+
`REPO` (#{Config.instance.repos_dir}/[REPO]), copies the podspec file into the
|
15
15
|
version directory, and finally it pushes `REPO` to its remote.
|
16
16
|
DESC
|
17
17
|
|
@@ -24,6 +24,7 @@ module Pod
|
|
24
24
|
[
|
25
25
|
['--allow-warnings', 'Allows pushing even if there are warnings'],
|
26
26
|
['--use-libraries', 'Linter uses static libraries to install the spec'],
|
27
|
+
['--use-modular-headers', 'Lint uses modular headers during installation'],
|
27
28
|
['--sources=https://github.com/artsy/Specs,master', 'The sources from which to pull dependent pods ' \
|
28
29
|
'(defaults to all available repos). ' \
|
29
30
|
'Multiple sources must be comma-delimited.'],
|
@@ -48,6 +49,7 @@ module Pod
|
|
48
49
|
@source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',')
|
49
50
|
@podspec = argv.shift_argument
|
50
51
|
@use_frameworks = !argv.flag?('use-libraries')
|
52
|
+
@use_modular_headers = argv.flag?('use-modular-headers', false)
|
51
53
|
@private = argv.flag?('private', true)
|
52
54
|
@message = argv.option('commit-message')
|
53
55
|
@commit_message = argv.flag?('commit-message', false)
|
@@ -131,6 +133,7 @@ module Pod
|
|
131
133
|
validator = Validator.new(podspec, @source_urls)
|
132
134
|
validator.allow_warnings = @allow_warnings
|
133
135
|
validator.use_frameworks = @use_frameworks
|
136
|
+
validator.use_modular_headers = @use_modular_headers
|
134
137
|
validator.ignore_public_only_results = @private
|
135
138
|
validator.swift_version = @swift_version
|
136
139
|
validator.skip_import_validation = @skip_import_validation
|
@@ -182,18 +185,20 @@ module Pod
|
|
182
185
|
podspec_files.each do |spec_file|
|
183
186
|
spec = Pod::Specification.from_file(spec_file)
|
184
187
|
output_path = @source.pod_path(spec.name) + spec.version.to_s
|
185
|
-
if @message && !@message.empty?
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
188
|
+
message = if @message && !@message.empty?
|
189
|
+
@message
|
190
|
+
elsif output_path.exist?
|
191
|
+
"[Fix] #{spec}"
|
192
|
+
elsif output_path.dirname.directory?
|
193
|
+
"[Update] #{spec}"
|
194
|
+
else
|
195
|
+
"[Add] #{spec}"
|
196
|
+
end
|
197
|
+
|
198
|
+
if output_path.exist? && !@allow_overwrite
|
199
|
+
raise Informative, "#{spec} already exists and overwriting has been disabled."
|
196
200
|
end
|
201
|
+
|
197
202
|
FileUtils.mkdir_p(output_path)
|
198
203
|
|
199
204
|
if @use_json
|
@@ -5,7 +5,7 @@ module Pod
|
|
5
5
|
self.summary = 'Remove a spec repo'
|
6
6
|
|
7
7
|
self.description = <<-DESC
|
8
|
-
Deletes the remote named `NAME` from the local spec-repos directory at
|
8
|
+
Deletes the remote named `NAME` from the local spec-repos directory at `#{Config.instance.repos_dir}`.
|
9
9
|
DESC
|
10
10
|
|
11
11
|
self.arguments = [
|
@@ -6,7 +6,7 @@ module Pod
|
|
6
6
|
|
7
7
|
self.description = <<-DESC
|
8
8
|
Updates the local clone of the spec-repo `NAME`. If `NAME` is omitted
|
9
|
-
this will update all spec-repos in
|
9
|
+
this will update all spec-repos in `#{Config.instance.repos_dir}`.
|
10
10
|
DESC
|
11
11
|
|
12
12
|
self.arguments = [
|
@@ -6,7 +6,7 @@ module Pod
|
|
6
6
|
self.summary = 'Setup the CocoaPods environment'
|
7
7
|
|
8
8
|
self.description = <<-DESC
|
9
|
-
Creates a directory at
|
9
|
+
Creates a directory at `#{Config.instance.repos_dir}` which will hold your spec-repos.
|
10
10
|
This is where it will create a clone of the public `master` spec-repo from:
|
11
11
|
|
12
12
|
https://github.com/CocoaPods/Specs
|
@@ -60,7 +60,7 @@ module Pod
|
|
60
60
|
data[:author_email] = `git config --get user.email`.strip
|
61
61
|
data[:source_url] = "http://EXAMPLE/#{name}.git"
|
62
62
|
data[:ref_type] = ':tag'
|
63
|
-
data[:ref] = '#{
|
63
|
+
data[:ref] = '#{spec.version}'
|
64
64
|
data
|
65
65
|
end
|
66
66
|
|
@@ -100,8 +100,8 @@ module Pod
|
|
100
100
|
else
|
101
101
|
data[:ref_type] = ':tag'
|
102
102
|
data[:ref] = versions_tags[version]
|
103
|
-
data[:ref] = '#{
|
104
|
-
data[:ref] = 'v#{
|
103
|
+
data[:ref] = '#{spec.version}' if "#{version}" == versions_tags[version]
|
104
|
+
data[:ref] = 'v#{spec.version}' if "v#{version}" == versions_tags[version]
|
105
105
|
end
|
106
106
|
data
|
107
107
|
end
|
@@ -112,11 +112,11 @@ module Pod
|
|
112
112
|
# Be sure to run `pod spec lint #{data[:name]}.podspec' to ensure this is a
|
113
113
|
# valid spec and to remove all comments including this before submitting the spec.
|
114
114
|
#
|
115
|
-
# To learn more about Podspec attributes see
|
115
|
+
# To learn more about Podspec attributes see https://docs.cocoapods.org/specification.html
|
116
116
|
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
|
117
117
|
#
|
118
118
|
|
119
|
-
Pod::Spec.new do |
|
119
|
+
Pod::Spec.new do |spec|
|
120
120
|
|
121
121
|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
122
122
|
#
|
@@ -125,31 +125,31 @@ Pod::Spec.new do |s|
|
|
125
125
|
# summary should be tweet-length, and the description more in depth.
|
126
126
|
#
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
128
|
+
spec.name = "#{data[:name]}"
|
129
|
+
spec.version = "#{data[:version]}"
|
130
|
+
spec.summary = "#{data[:summary]}"
|
131
131
|
|
132
132
|
# This description is used to generate tags and improve search results.
|
133
133
|
# * Think: What does it do? Why did you write it? What is the focus?
|
134
134
|
# * Try to keep it short, snappy and to the point.
|
135
135
|
# * Write the description between the DESC delimiters below.
|
136
136
|
# * Finally, don't worry about the indent, CocoaPods strips it!
|
137
|
-
|
137
|
+
spec.description = <<-DESC
|
138
138
|
DESC
|
139
139
|
|
140
|
-
|
141
|
-
#
|
140
|
+
spec.homepage = "#{data[:homepage]}"
|
141
|
+
# spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
|
142
142
|
|
143
143
|
|
144
144
|
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
145
145
|
#
|
146
|
-
# Licensing your code is important. See
|
146
|
+
# Licensing your code is important. See https://choosealicense.com for more info.
|
147
147
|
# CocoaPods will detect a license file if there is a named LICENSE*
|
148
148
|
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
|
149
149
|
#
|
150
150
|
|
151
|
-
|
152
|
-
#
|
151
|
+
spec.license = "MIT (example)"
|
152
|
+
# spec.license = { :type => "MIT", :file => "FILE_LICENSE" }
|
153
153
|
|
154
154
|
|
155
155
|
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -162,10 +162,10 @@ Pod::Spec.new do |s|
|
|
162
162
|
# profile URL.
|
163
163
|
#
|
164
164
|
|
165
|
-
|
166
|
-
# Or just:
|
167
|
-
#
|
168
|
-
#
|
165
|
+
spec.author = { "#{data[:author_name]}" => "#{data[:author_email]}" }
|
166
|
+
# Or just: spec.author = "#{data[:author_name]}"
|
167
|
+
# spec.authors = { "#{data[:author_name]}" => "#{data[:author_email]}" }
|
168
|
+
# spec.social_media_url = "https://twitter.com/#{data[:author_name]}"
|
169
169
|
|
170
170
|
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
171
171
|
#
|
@@ -173,14 +173,14 @@ Pod::Spec.new do |s|
|
|
173
173
|
# the deployment target. You can optionally include the target after the platform.
|
174
174
|
#
|
175
175
|
|
176
|
-
#
|
177
|
-
#
|
176
|
+
# spec.platform = :ios
|
177
|
+
# spec.platform = :ios, "5.0"
|
178
178
|
|
179
179
|
# When using multiple platforms
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
180
|
+
# spec.ios.deployment_target = "5.0"
|
181
|
+
# spec.osx.deployment_target = "10.7"
|
182
|
+
# spec.watchos.deployment_target = "2.0"
|
183
|
+
# spec.tvos.deployment_target = "9.0"
|
184
184
|
|
185
185
|
|
186
186
|
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -189,7 +189,7 @@ Pod::Spec.new do |s|
|
|
189
189
|
# Supports git, hg, bzr, svn and HTTP.
|
190
190
|
#
|
191
191
|
|
192
|
-
|
192
|
+
spec.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => "#{data[:ref]}" }
|
193
193
|
|
194
194
|
|
195
195
|
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -200,10 +200,10 @@ Pod::Spec.new do |s|
|
|
200
200
|
# Not including the public_header_files will make all headers public.
|
201
201
|
#
|
202
202
|
|
203
|
-
|
204
|
-
|
203
|
+
spec.source_files = "Classes", "Classes/**/*.{h,m}"
|
204
|
+
spec.exclude_files = "Classes/Exclude"
|
205
205
|
|
206
|
-
#
|
206
|
+
# spec.public_header_files = "Classes/**/*.h"
|
207
207
|
|
208
208
|
|
209
209
|
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -214,10 +214,10 @@ Pod::Spec.new do |s|
|
|
214
214
|
# non-essential files like tests, examples and documentation.
|
215
215
|
#
|
216
216
|
|
217
|
-
#
|
218
|
-
#
|
217
|
+
# spec.resource = "icon.png"
|
218
|
+
# spec.resources = "Resources/*.png"
|
219
219
|
|
220
|
-
#
|
220
|
+
# spec.preserve_paths = "FilesToSave", "MoreFilesToSave"
|
221
221
|
|
222
222
|
|
223
223
|
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -226,11 +226,11 @@ Pod::Spec.new do |s|
|
|
226
226
|
# the lib prefix of their name.
|
227
227
|
#
|
228
228
|
|
229
|
-
#
|
230
|
-
#
|
229
|
+
# spec.framework = "SomeFramework"
|
230
|
+
# spec.frameworks = "SomeFramework", "AnotherFramework"
|
231
231
|
|
232
|
-
#
|
233
|
-
#
|
232
|
+
# spec.library = "iconv"
|
233
|
+
# spec.libraries = "iconv", "xml2"
|
234
234
|
|
235
235
|
|
236
236
|
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
@@ -239,10 +239,10 @@ Pod::Spec.new do |s|
|
|
239
239
|
# where they will only apply to your library. If you depend on other Podspecs
|
240
240
|
# you can include multiple dependencies to ensure it works.
|
241
241
|
|
242
|
-
#
|
242
|
+
# spec.requires_arc = true
|
243
243
|
|
244
|
-
#
|
245
|
-
#
|
244
|
+
# spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
|
245
|
+
# spec.dependency "JSONKit", "~> 1.4"
|
246
246
|
|
247
247
|
end
|
248
248
|
SPEC
|
@@ -259,7 +259,7 @@ CocoaPods is a tool for managing dependencies for OSX and iOS Xcode projects and
|
|
259
259
|
|
260
260
|
However, #{repo} doesn't have any version tags. I’ve added the current HEAD as version 0.0.1, but a version tag will make dependency resolution much easier.
|
261
261
|
|
262
|
-
[Semantic version](
|
262
|
+
[Semantic version](https://semver.org) tags (instead of plain commit hashes/revisions) allow for [resolution of cross-dependencies](https://github.com/CocoaPods/Specs/wiki/Cross-dependencies-resolution-example).
|
263
263
|
|
264
264
|
In case you didn’t know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:
|
265
265
|
|