Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
940f7019
Commit
940f7019
authored
Nov 30, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Fully deintegrate on major version change
parent
0ffb7a6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
cocoapods.rb
lib/cocoapods.rb
+1
-0
installer.rb
lib/cocoapods/installer.rb
+20
-0
user_project_integrator.rb
lib/cocoapods/installer/user_project_integrator.rb
+0
-2
No files found.
lib/cocoapods.rb
View file @
940f7019
...
...
@@ -40,6 +40,7 @@ module Pod
autoload
:AggregateTarget
,
'cocoapods/target/aggregate_target'
autoload
:Command
,
'cocoapods/command'
autoload
:Deintegrator
,
'cocoapods_deintegrate'
autoload
:Executable
,
'cocoapods/executable'
autoload
:ExternalSources
,
'cocoapods/external_sources'
autoload
:Installer
,
'cocoapods/installer'
...
...
lib/cocoapods/installer.rb
View file @
940f7019
...
...
@@ -121,6 +121,7 @@ module Pod
raise
Informative
,
message
end
UI
.
message
'Preparing'
do
deintegrate_if_different_major_version
sandbox
.
prepare
ensure_plugins_are_installed!
Migrator
.
migrate
(
sandbox
)
...
...
@@ -486,6 +487,25 @@ module Pod
context
.
sources
end
# Run the deintegrator against all projects in the installation root if the
# current CocoaPods major version part is different than the one in the
# lockfile.
#
# @return [void]
#
def
deintegrate_if_different_major_version
return
unless
config
.
lockfile
return
if
config
.
lockfile
.
cocoapods_version
.
major
==
Version
.
new
(
VERSION
).
major
UI
.
section
(
'Fully deintegrating due to major version update'
)
do
projects
=
Pathname
.
glob
(
config
.
installation_root
+
'*.xcodeproj'
).
map
{
|
path
|
Xcodeproj
::
Project
.
open
(
path
)
}
deintegrator
=
Deintegrator
.
new
projects
.
sort
.
each
do
|
project
|
deintegrator
.
deintegrate_project
(
project
)
project
.
save
if
project
.
dirty?
end
end
end
# Ensures that all plugins specified in the {#podfile} are loaded.
#
# @return [void]
...
...
lib/cocoapods/installer/user_project_integrator.rb
View file @
940f7019
...
...
@@ -5,8 +5,6 @@ require 'active_support/core_ext/string/inflections'
require
'active_support/core_ext/array/conversions'
module
Pod
autoload
:Deintegrator
,
'cocoapods_deintegrate'
class
Installer
# The {UserProjectIntegrator} integrates the libraries generated by
# TargetDefinitions of the {Podfile} with their correspondent user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment