cocoapods 1.6.2 → 1.7.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 +101 -7
- data/README.md +9 -9
- data/lib/cocoapods.rb +2 -0
- data/lib/cocoapods/command.rb +1 -1
- data/lib/cocoapods/command/init.rb +2 -12
- data/lib/cocoapods/command/install.rb +3 -0
- data/lib/cocoapods/command/lib/create.rb +1 -1
- data/lib/cocoapods/command/lib/lint.rb +5 -1
- data/lib/cocoapods/command/list.rb +3 -5
- data/lib/cocoapods/command/repo.rb +1 -0
- data/lib/cocoapods/command/repo/add.rb +4 -5
- data/lib/cocoapods/command/repo/add_cdn.rb +58 -0
- data/lib/cocoapods/command/repo/list.rb +5 -6
- data/lib/cocoapods/command/repo/push.rb +6 -5
- data/lib/cocoapods/command/spec/create.rb +12 -12
- data/lib/cocoapods/command/spec/lint.rb +1 -1
- data/lib/cocoapods/command/update.rb +3 -0
- data/lib/cocoapods/config.rb +1 -0
- data/lib/cocoapods/executable.rb +32 -7
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/app_target_helper.rb +1 -1
- data/lib/cocoapods/generator/embed_frameworks_script.rb +13 -0
- data/lib/cocoapods/generator/file_list.rb +39 -0
- data/lib/cocoapods/generator/module_map.rb +1 -1
- data/lib/cocoapods/installer.rb +188 -46
- data/lib/cocoapods/installer/analyzer.rb +64 -39
- data/lib/cocoapods/installer/analyzer/pod_variant.rb +14 -9
- data/lib/cocoapods/installer/analyzer/pod_variant_set.rb +11 -2
- data/lib/cocoapods/installer/installation_options.rb +70 -44
- data/lib/cocoapods/installer/pod_source_installer.rb +9 -4
- data/lib/cocoapods/installer/podfile_validator.rb +9 -0
- data/lib/cocoapods/installer/post_install_hooks_context.rb +5 -2
- data/lib/cocoapods/installer/project_cache/project_cache.rb +11 -0
- data/lib/cocoapods/installer/project_cache/project_cache_analysis_result.rb +53 -0
- data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +156 -0
- data/lib/cocoapods/installer/project_cache/project_cache_version.rb +43 -0
- data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +77 -0
- data/lib/cocoapods/installer/project_cache/project_metadata_cache.rb +63 -0
- data/lib/cocoapods/installer/project_cache/target_cache_key.rb +134 -0
- data/lib/cocoapods/installer/project_cache/target_metadata.rb +70 -0
- data/lib/cocoapods/installer/sandbox_dir_cleaner.rb +89 -0
- data/lib/cocoapods/installer/sandbox_header_paths_installer.rb +45 -0
- data/lib/cocoapods/installer/target_uuid_generator.rb +32 -0
- data/lib/cocoapods/installer/user_project_integrator.rb +8 -6
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +128 -63
- data/lib/cocoapods/installer/xcode.rb +3 -0
- data/lib/cocoapods/installer/xcode/multi_pods_project_generator.rb +72 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator.rb +102 -218
- data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_dependency_installer.rb +75 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +1 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +29 -17
- data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +31 -65
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +155 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +265 -110
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +70 -43
- data/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb +75 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +119 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +44 -7
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb +5 -7
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installer_helper.rb +32 -0
- data/lib/cocoapods/installer/xcode/pods_project_generator_result.rb +35 -0
- data/lib/cocoapods/installer/xcode/single_pods_project_generator.rb +38 -0
- data/lib/cocoapods/installer/xcode/target_validator.rb +32 -25
- data/lib/cocoapods/native_target_extension.rb +54 -0
- data/lib/cocoapods/open-uri.rb +1 -1
- data/lib/cocoapods/podfile.rb +13 -0
- data/lib/cocoapods/project.rb +88 -10
- data/lib/cocoapods/resolver.rb +11 -8
- data/lib/cocoapods/resolver/resolver_specification.rb +7 -7
- data/lib/cocoapods/sandbox.rb +38 -9
- data/lib/cocoapods/sandbox/file_accessor.rb +21 -0
- data/lib/cocoapods/sandbox/headers_store.rb +18 -3
- data/lib/cocoapods/sandbox/pod_dir_cleaner.rb +1 -14
- data/lib/cocoapods/sources_manager.rb +11 -3
- data/lib/cocoapods/target.rb +67 -7
- data/lib/cocoapods/target/aggregate_target.rb +70 -8
- data/lib/cocoapods/target/build_settings.rb +124 -65
- data/lib/cocoapods/target/build_type.rb +139 -0
- data/lib/cocoapods/target/framework_paths.rb +12 -7
- data/lib/cocoapods/target/pod_target.rb +322 -65
- data/lib/cocoapods/user_interface.rb +2 -2
- data/lib/cocoapods/user_interface/error_report.rb +3 -0
- data/lib/cocoapods/user_interface/inspector_reporter.rb +1 -1
- data/lib/cocoapods/validator.rb +74 -39
- data/lib/cocoapods/version_metadata.rb +7 -0
- metadata +30 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 251d2a4d591d6dc009ac406e8ada03758161935b
|
|
4
|
+
data.tar.gz: ad7bfa1ad9867f8f6bb43f3006263cd83bd7cb6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2910aeb0f9ca431d6a516db10233f27353815bb137a6a59f6e5c5559e7c931cc8eff3834182a783b968cd226e0a4bb54f93fea49233d775c91d936428eb1a184
|
|
7
|
+
data.tar.gz: 81fcb38ee8e277d599cc09d0e7c1f1cefba5a23423d55d6722ea162afdb216379146bfe53e365e4e6269d3c02e4b817fcb0882741f2533bb25ef4ec713d5f6de
|
data/CHANGELOG.md
CHANGED
|
@@ -4,17 +4,110 @@ 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.
|
|
7
|
+
## 1.7.0.beta.1 (2019-02-22)
|
|
8
8
|
|
|
9
9
|
##### Enhancements
|
|
10
10
|
|
|
11
|
-
*
|
|
11
|
+
* Copy `bcsymbolmap` files of a vendored framework.
|
|
12
|
+
[dacaiguoguogmail](https://github.com/dacaiguoguogmail)
|
|
13
|
+
[#8461](https://github.com/CocoaPods/CocoaPods/issues/8461)
|
|
14
|
+
|
|
15
|
+
* Set the path of development pod groups to root directory of the Pod
|
|
16
|
+
[Eric Amorde](https://github.com/amorde)
|
|
17
|
+
[#8445](https://github.com/CocoaPods/CocoaPods/pull/8445)
|
|
18
|
+
[#8503](https://github.com/CocoaPods/CocoaPods/pull/8503)
|
|
19
|
+
|
|
20
|
+
* Incremental Pod Installation
|
|
21
|
+
Enables only regenerating projects for pod targets that have changed since the previous installation.
|
|
22
|
+
This feature is gated by the `incremental_installation` option.
|
|
23
|
+
[Sebastian Shanus](https://github.com/sebastianv1)
|
|
24
|
+
[#8319](https://github.com/CocoaPods/CocoaPods/issues/8319)
|
|
25
|
+
|
|
26
|
+
* Podfile: Add a CDNSource automatically if it's not present, just like git source.
|
|
27
|
+
Convenience for CDNSource when specified as `source 'https://cdn.jsdelivr.net/cocoa/'`.
|
|
28
|
+
If source doesn't exist, it will be created.
|
|
29
|
+
[igor-makarov](https://github.com/igor-makarov)
|
|
30
|
+
[#8362](https://github.com/CocoaPods/CocoaPods/pull/8362)
|
|
31
|
+
|
|
32
|
+
* Scheme configuration support.
|
|
33
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
|
34
|
+
[#7577](https://github.com/CocoaPods/CocoaPods/issues/7577)
|
|
35
|
+
|
|
36
|
+
* Add support for `.rb` extension for Podfiles
|
|
37
|
+
[Eric Amorde](https://github.com/amorde)
|
|
38
|
+
[#8171](https://github.com/CocoaPods/CocoaPods/issues/8171)
|
|
39
|
+
|
|
40
|
+
* Add CDN repo Source to allow retrieving specs from a web URL.
|
|
41
|
+
[igor-makarov](https://github.com/igor-makarov)
|
|
42
|
+
[#8268](https://github.com/CocoaPods/CocoaPods/issues/8268) (partial beta solution)
|
|
43
|
+
|
|
44
|
+
* Multi Pod Project Generation Support.
|
|
45
|
+
Support for splitting the pods project into a subproject per pod target, gated by the `generate_multiple_pod_projects` installation option.
|
|
46
|
+
[Sebastian Shanus](https://github.com/sebastianv1)
|
|
47
|
+
[#8253](https://github.com/CocoaPods/CocoaPods/issues/8253)
|
|
48
|
+
|
|
49
|
+
* Don't add main for app specs.
|
|
50
|
+
[Derek Ostrander](https://github.com/dostrander)
|
|
51
|
+
[#8235](https://github.com/CocoaPods/CocoaPods/pull/8235)
|
|
52
|
+
|
|
53
|
+
* Multiple Swift versions support
|
|
54
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
|
55
|
+
[#8191](https://github.com/CocoaPods/CocoaPods/issues/8191)
|
|
56
|
+
|
|
57
|
+
* Adds app spec project integration.
|
|
58
|
+
[Derek Ostrander](https://github.com/dostrander)
|
|
59
|
+
[#8158](https://github.com/CocoaPods/CocoaPods/pull/8158)
|
|
60
|
+
|
|
61
|
+
* Add documentation for the Podfile installation options
|
|
62
|
+
[Eric Amorde](https://github.com/amorde)
|
|
63
|
+
[#8198](https://github.com/CocoaPods/CocoaPods/issues/8198)
|
|
64
|
+
[guides.cocoapods.org #142](https://github.com/CocoaPods/guides.cocoapods.org/issues/142)
|
|
12
65
|
|
|
13
66
|
##### Bug Fixes
|
|
14
67
|
|
|
15
|
-
*
|
|
68
|
+
* Clean up old integrated framework references.
|
|
69
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkouts)
|
|
70
|
+
[#8296](https://github.com/CocoaPods/CocoaPods/issues/8296)
|
|
71
|
+
|
|
72
|
+
* Always update sources specified with the `:source` option when `--repo-update` is specified
|
|
73
|
+
[Eric Amorde](https://github.com/amorde)
|
|
74
|
+
[#8421](https://github.com/CocoaPods/CocoaPods/issues/8421)
|
|
75
|
+
|
|
76
|
+
* Set `showEnvVarsInLog` for script phases only when its disabled.
|
|
16
77
|
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
|
17
|
-
[#
|
|
78
|
+
[#8400](https://github.com/CocoaPods/CocoaPods/pull/8400)
|
|
79
|
+
|
|
80
|
+
* Fix error when execute pod list --update --verbose command
|
|
81
|
+
[tripleCC](https://github.com/tripleCC)
|
|
82
|
+
[#8404](https://github.com/CocoaPods/CocoaPods/pull/8404)
|
|
83
|
+
|
|
84
|
+
* Remove `manifest` attribute from sandbox.
|
|
85
|
+
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
|
|
86
|
+
[#8260](https://github.com/CocoaPods/CocoaPods/pull/8260)
|
|
87
|
+
|
|
88
|
+
* Don't have libraries build the app spec.
|
|
89
|
+
[Derek Ostrander](https://github.com/dostrander)
|
|
90
|
+
[#8244](https://github.com/CocoaPods/CocoaPods/pull/8244)
|
|
91
|
+
|
|
92
|
+
* Fix HTTPs -> HTTPS in warning message
|
|
93
|
+
[CydeWeys](https://github.com/CydeWeys)
|
|
94
|
+
[#8354](https://github.com/CocoaPods/CocoaPods/issues/8354)
|
|
95
|
+
|
|
96
|
+
* Add the `FRAMEWORK_SEARCH_PATHS` necessary to import `XCTest` when it is
|
|
97
|
+
linked as a weak framework.
|
|
98
|
+
[Samuel Giddins](https://github.com/segiddins)
|
|
99
|
+
|
|
100
|
+
* Treat `USER_HEADER_SEARCH_PATHS` as a plural build setting.
|
|
101
|
+
[Samuel Giddins](https://github.com/segiddins)
|
|
102
|
+
[#8451](https://github.com/CocoaPods/CocoaPods/issues/8451)
|
|
103
|
+
|
|
104
|
+
* Trying to add a spec repo with a `file://` URL on Ruby 2.6 won't fail with a
|
|
105
|
+
a git unknown option error.
|
|
106
|
+
[Samuel Giddins](https://github.com/segiddins)
|
|
107
|
+
|
|
108
|
+
* Fixed test host delegate methods to not warn about unused arguments.
|
|
109
|
+
[Jacek Suliga](https://github.com/jmkk)
|
|
110
|
+
[#8521](https://github.com/CocoaPods/CocoaPods/pull/8521)
|
|
18
111
|
|
|
19
112
|
|
|
20
113
|
## 1.6.1 (2019-02-21)
|
|
@@ -45,7 +138,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
|
45
138
|
|
|
46
139
|
##### Enhancements
|
|
47
140
|
|
|
48
|
-
* None.
|
|
141
|
+
* None.
|
|
49
142
|
|
|
50
143
|
##### Bug Fixes
|
|
51
144
|
|
|
@@ -53,6 +146,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
|
53
146
|
[Wes Campaigne](https://github.com/Westacular)
|
|
54
147
|
[#8453](https://github.com/CocoaPods/CocoaPods/issues/8453)
|
|
55
148
|
|
|
149
|
+
|
|
56
150
|
## 1.6.0.rc.1 (2019-01-25)
|
|
57
151
|
|
|
58
152
|
##### Enhancements
|
|
@@ -118,8 +212,8 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
|
|
|
118
212
|
|
|
119
213
|
* Slightly improve resolution speed for Podfiles that contain multiple targets
|
|
120
214
|
with the same dependencies.
|
|
121
|
-
[Samuel Giddins]
|
|
122
|
-
|
|
215
|
+
[Samuel Giddins](https://github.com/segiddins)
|
|
216
|
+
|
|
123
217
|
##### Bug Fixes
|
|
124
218
|
|
|
125
219
|
* Don't generate unencrypted source warnings for localhost.
|
data/README.md
CHANGED
|
@@ -14,7 +14,7 @@ source code for all dependencies, and creates and maintains an Xcode
|
|
|
14
14
|
workspace to build your project.
|
|
15
15
|
|
|
16
16
|
Installing and updating CocoaPods is very easy. Don't miss the [Installation
|
|
17
|
-
guide](
|
|
17
|
+
guide](https://guides.cocoapods.org/using/getting-started.html#installation) and the
|
|
18
18
|
[Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
|
|
19
19
|
|
|
20
20
|
## Project Goals
|
|
@@ -58,7 +58,7 @@ contributor [code of conduct](CODE_OF_CONDUCT.md).
|
|
|
58
58
|
[CocoaPods.org](https://cocoapods.org/) | Homepage and search for Pods.
|
|
59
59
|
[@CocoaPods](https://twitter.com/CocoaPods) | Follow CocoaPods on Twitter to stay up to date.
|
|
60
60
|
[Blog](https://blog.cocoapods.org) | The CocoaPods blog.
|
|
61
|
-
[Mailing List](
|
|
61
|
+
[Mailing List](https://groups.google.com/group/cocoapods) | Feel free to ask any kind of question.
|
|
62
62
|
[Guides](https://guides.cocoapods.org) | Everything you want to know about CocoaPods.
|
|
63
63
|
[Changelog](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md) | See the changes introduced in each CocoaPods version.
|
|
64
64
|
[New Pods RSS](https://feeds.cocoapods.org/new-pods.rss) | Don't miss any new Pods.
|
|
@@ -70,11 +70,11 @@ CocoaPods is composed of the following projects:
|
|
|
70
70
|
|
|
71
71
|
| Status | Project | Description | Info |
|
|
72
72
|
| :----- | :------ | :--- | :--- |
|
|
73
|
-
| [](
|
|
74
|
-
| [](
|
|
75
|
-
| [](
|
|
76
|
-
| [](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](
|
|
77
|
-
| [](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](
|
|
78
|
-
| [](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](
|
|
73
|
+
| [](https://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](https://guides.cocoapods.org)
|
|
74
|
+
| [](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)
|
|
75
|
+
| [](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)
|
|
76
|
+
| [](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)
|
|
77
|
+
| [](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)
|
|
78
|
+
| [](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](https://www.rubydoc.info/gems/molinillo)
|
|
79
79
|
| [](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)
|
|
80
|
-
| | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guides](
|
|
80
|
+
| | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guides](https://guides.cocoapods.org/making/specs-and-specs-repo.html)
|
data/lib/cocoapods.rb
CHANGED
|
@@ -19,6 +19,7 @@ module Pod
|
|
|
19
19
|
require 'tmpdir'
|
|
20
20
|
|
|
21
21
|
require 'cocoapods/gem_version'
|
|
22
|
+
require 'cocoapods/version_metadata'
|
|
22
23
|
require 'cocoapods-core'
|
|
23
24
|
require 'cocoapods/config'
|
|
24
25
|
require 'cocoapods/downloader'
|
|
@@ -61,6 +62,7 @@ module Pod
|
|
|
61
62
|
autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
|
|
62
63
|
autoload :DummySource, 'cocoapods/generator/dummy_source'
|
|
63
64
|
autoload :EmbedFrameworksScript, 'cocoapods/generator/embed_frameworks_script'
|
|
65
|
+
autoload :FileList, 'cocoapods/generator/file_list'
|
|
64
66
|
autoload :Header, 'cocoapods/generator/header'
|
|
65
67
|
autoload :InfoPlistFile, 'cocoapods/generator/info_plist_file'
|
|
66
68
|
autoload :ModuleMap, 'cocoapods/generator/module_map'
|
data/lib/cocoapods/command.rb
CHANGED
|
@@ -44,7 +44,7 @@ module Pod
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def self.run(argv)
|
|
47
|
-
help! 'You cannot run CocoaPods as root.' if Process.uid == 0
|
|
47
|
+
help! 'You cannot run CocoaPods as root.' if Process.uid == 0 && !Gem.win_platform?
|
|
48
48
|
|
|
49
49
|
verify_minimum_git_version!
|
|
50
50
|
verify_xcode_license_approved!
|
|
@@ -84,21 +84,11 @@ module Pod
|
|
|
84
84
|
def target_module(app, tests)
|
|
85
85
|
target_module = "\ntarget '#{app.name.gsub(/'/, "\\\\\'")}' do\n"
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
target_module << if app_uses_swift
|
|
90
|
-
<<-RUBY
|
|
91
|
-
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
|
|
87
|
+
target_module << <<-RUBY
|
|
88
|
+
# Comment the next line if you don't want to use dynamic frameworks
|
|
92
89
|
use_frameworks!
|
|
93
90
|
|
|
94
91
|
RUBY
|
|
95
|
-
else
|
|
96
|
-
<<-RUBY
|
|
97
|
-
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
|
|
98
|
-
# use_frameworks!
|
|
99
|
-
|
|
100
|
-
RUBY
|
|
101
|
-
end
|
|
102
92
|
|
|
103
93
|
target_module << template_contents(config.default_podfile_path, ' ', "Pods for #{app.name}\n")
|
|
104
94
|
|
|
@@ -31,12 +31,14 @@ module Pod
|
|
|
31
31
|
[
|
|
32
32
|
['--repo-update', 'Force running `pod repo update` before install'],
|
|
33
33
|
['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'],
|
|
34
|
+
['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only applies to projects that have enabled incremental installation.'],
|
|
34
35
|
].concat(super).reject { |(name, _)| name == '--no-repo-update' }
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
def initialize(argv)
|
|
38
39
|
super
|
|
39
40
|
@deployment = argv.flag?('deployment', false)
|
|
41
|
+
@clean_install = argv.flag?('clean-install', false)
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
def run
|
|
@@ -45,6 +47,7 @@ module Pod
|
|
|
45
47
|
installer.repo_update = repo_update?(:default => false)
|
|
46
48
|
installer.update = false
|
|
47
49
|
installer.deployment = @deployment
|
|
50
|
+
installer.clean_install = @clean_install
|
|
48
51
|
installer.install!
|
|
49
52
|
end
|
|
50
53
|
end
|
|
@@ -54,7 +54,7 @@ module Pod
|
|
|
54
54
|
|
|
55
55
|
TEMPLATE_REPO = 'https://github.com/CocoaPods/pod-template.git'.freeze
|
|
56
56
|
TEMPLATE_INFO_URL = 'https://github.com/CocoaPods/pod-template'.freeze
|
|
57
|
-
CREATE_NEW_POD_INFO_URL = '
|
|
57
|
+
CREATE_NEW_POD_INFO_URL = 'https://guides.cocoapods.org/making/making-a-cocoapod'.freeze
|
|
58
58
|
|
|
59
59
|
# Clones the template from the remote in the working directory using
|
|
60
60
|
# the name of the Pod.
|
|
@@ -8,6 +8,10 @@ module Pod
|
|
|
8
8
|
Validates the Pod using the files in the working directory.
|
|
9
9
|
DESC
|
|
10
10
|
|
|
11
|
+
self.arguments = [
|
|
12
|
+
CLAide::Argument.new('PODSPEC_PATHS', false, true),
|
|
13
|
+
]
|
|
14
|
+
|
|
11
15
|
def self.options
|
|
12
16
|
[
|
|
13
17
|
['--quick', 'Lint skips checks that would require to download and build the spec'],
|
|
@@ -26,7 +30,7 @@ module Pod
|
|
|
26
30
|
'Multiple platforms must be comma-delimited'],
|
|
27
31
|
['--private', 'Lint skips checks that apply only to public specs'],
|
|
28
32
|
['--swift-version=VERSION', 'The SWIFT_VERSION that should be used to lint the spec. ' \
|
|
29
|
-
'This takes precedence over a
|
|
33
|
+
'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file.'],
|
|
30
34
|
['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
|
|
31
35
|
['--skip-tests', 'Lint skips building and running tests during validation'],
|
|
32
36
|
].concat(super)
|
|
@@ -26,11 +26,9 @@ module Pod
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def update_if_necessary!
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
end
|
|
33
|
-
end
|
|
29
|
+
UI.section("\nUpdating Spec Repositories\n".yellow) do
|
|
30
|
+
Repo::Update.new(CLAide::ARGV.new([])).run
|
|
31
|
+
end if @update
|
|
34
32
|
end
|
|
35
33
|
|
|
36
34
|
#-----------------------------------------------------------------------#
|
|
@@ -77,14 +77,13 @@ module Pod
|
|
|
77
77
|
{ :verbose => true }
|
|
78
78
|
else
|
|
79
79
|
{}
|
|
80
|
-
|
|
80
|
+
end
|
|
81
81
|
|
|
82
82
|
config.with_changes(changes) do
|
|
83
83
|
Dir.chdir(config.repos_dir) do
|
|
84
|
-
command = ['clone', @url
|
|
85
|
-
if @progress
|
|
86
|
-
|
|
87
|
-
end
|
|
84
|
+
command = ['clone', @url]
|
|
85
|
+
command << '--progress' if @progress
|
|
86
|
+
command << '--' << @name
|
|
88
87
|
git!(command)
|
|
89
88
|
end
|
|
90
89
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
module Pod
|
|
2
|
+
class Command
|
|
3
|
+
class Repo < Command
|
|
4
|
+
class AddCDN < Repo
|
|
5
|
+
self.summary = 'Add a spec repo backed by a CDN'
|
|
6
|
+
|
|
7
|
+
self.description = <<-DESC
|
|
8
|
+
Add `URL` to the local spec-repos directory at `#{Config.instance.repos_dir}`. The
|
|
9
|
+
remote can later be referred to by `NAME`.
|
|
10
|
+
DESC
|
|
11
|
+
|
|
12
|
+
self.arguments = [
|
|
13
|
+
CLAide::Argument.new('NAME', true),
|
|
14
|
+
CLAide::Argument.new('URL', true),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
def initialize(argv)
|
|
18
|
+
@name = argv.shift_argument
|
|
19
|
+
@url = argv.shift_argument
|
|
20
|
+
super
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def validate!
|
|
24
|
+
super
|
|
25
|
+
unless @name && @url
|
|
26
|
+
help! 'Adding a repo needs a `NAME` and a `URL`.'
|
|
27
|
+
end
|
|
28
|
+
if @name == 'master'
|
|
29
|
+
raise Informative,
|
|
30
|
+
'To setup the master specs repo, please run `pod setup`.'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def run
|
|
35
|
+
section = "Adding spec repo `#{@name}` with CDN `#{@url}`"
|
|
36
|
+
UI.section(section) do
|
|
37
|
+
save_url
|
|
38
|
+
config.sources_manager.sources([dir.basename.to_s]).each(&:verify_compatibility!)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
private
|
|
43
|
+
|
|
44
|
+
# Saves the spec-repo URL to a '.url' file.
|
|
45
|
+
#
|
|
46
|
+
# @return [void]
|
|
47
|
+
#
|
|
48
|
+
def save_url
|
|
49
|
+
dir.mkpath
|
|
50
|
+
File.open(dir + '.url', 'w') { |file| file.write(@url) }
|
|
51
|
+
rescue => e
|
|
52
|
+
raise Informative, "Could not create '#{config.repos_dir}', the CocoaPods repo cache directory.\n" \
|
|
53
|
+
"#{e.class.name}: #{e.message}"
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -46,13 +46,12 @@ module Pod
|
|
|
46
46
|
#
|
|
47
47
|
def print_source(source)
|
|
48
48
|
if source.git?
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
end
|
|
49
|
+
branch_name, = Executable.capture_command('git', %w(name-rev --name-only HEAD), :capture => :out, :chdir => source.repo)
|
|
50
|
+
branch_name.strip!
|
|
51
|
+
branch_name = 'unknown' if branch_name.empty?
|
|
52
|
+
UI.puts "- Type: git (#{branch_name})"
|
|
54
53
|
else
|
|
55
|
-
UI.puts
|
|
54
|
+
UI.puts "- Type: #{source.type}"
|
|
56
55
|
end
|
|
57
56
|
|
|
58
57
|
UI.puts "- URL: #{source.url}"
|
|
@@ -36,7 +36,7 @@ module Pod
|
|
|
36
36
|
'Opens default editor if no commit message is specified.'],
|
|
37
37
|
['--use-json', 'Push JSON spec to repo'],
|
|
38
38
|
['--swift-version=VERSION', 'The SWIFT_VERSION that should be used when linting the spec. ' \
|
|
39
|
-
'This takes precedence over a
|
|
39
|
+
'This takes precedence over the Swift versions specified by the spec or a `.swift-version` file.'],
|
|
40
40
|
['--no-overwrite', 'Disallow pushing that would overwrite an existing spec.'],
|
|
41
41
|
].concat(super)
|
|
42
42
|
end
|
|
@@ -107,7 +107,7 @@ module Pod
|
|
|
107
107
|
# specs to the master repo.
|
|
108
108
|
#
|
|
109
109
|
def check_if_master_repo
|
|
110
|
-
remotes =
|
|
110
|
+
remotes, = Executable.capture_command('git', %w(remote --verbose), :capture => :merge, :chdir => repo_dir)
|
|
111
111
|
master_repo_urls = [
|
|
112
112
|
'git@github.com:CocoaPods/Specs.git',
|
|
113
113
|
'https://github.com/CocoaPods/Specs.git',
|
|
@@ -160,7 +160,8 @@ module Pod
|
|
|
160
160
|
# @return [void]
|
|
161
161
|
#
|
|
162
162
|
def check_repo_status
|
|
163
|
-
|
|
163
|
+
porcelain_status, = Executable.capture_command('git', %w(status --porcelain), :capture => :merge, :chdir => repo_dir)
|
|
164
|
+
clean = porcelain_status == ''
|
|
164
165
|
raise Informative, "The repo `#{@repo}` at #{UI.path repo_dir} is not clean" unless clean
|
|
165
166
|
end
|
|
166
167
|
|
|
@@ -170,7 +171,7 @@ module Pod
|
|
|
170
171
|
#
|
|
171
172
|
def update_repo
|
|
172
173
|
UI.puts "Updating the `#{@repo}' repo\n".yellow
|
|
173
|
-
|
|
174
|
+
git!(%W(-C #{repo_dir} pull))
|
|
174
175
|
end
|
|
175
176
|
|
|
176
177
|
# Commits the podspecs to the source, which should be a git repo.
|
|
@@ -226,7 +227,7 @@ module Pod
|
|
|
226
227
|
#
|
|
227
228
|
def push_repo
|
|
228
229
|
UI.puts "\nPushing the `#{@repo}' repo\n".yellow
|
|
229
|
-
repo_git('
|
|
230
|
+
repo_git('push', 'origin', 'master')
|
|
230
231
|
end
|
|
231
232
|
|
|
232
233
|
#---------------------------------------------------------------------#
|