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
a59bd1b8
Commit
a59bd1b8
authored
May 31, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3622 from CocoaPods/seg-cache-version
[Cache] Remove cache when CocoaPods version changes
parents
9ab00867
7595d668
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
CHANGELOG.md
CHANGELOG.md
+10
-2
cache.rb
lib/cocoapods/downloader/cache.rb
+16
-1
cache_spec.rb
spec/unit/downloader/cache_spec.rb
+9
-0
No files found.
CHANGELOG.md
View file @
a59bd1b8
...
@@ -6,13 +6,21 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -6,13 +6,21 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
## Master
## Master
### Bug Fixes
##### Enhancements
*
The download cache will automatically be reset when changing CocoaPods
versions.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#3542
](
https://github.com/CocoaPods/CocoaPods/issues/3542
)
##### Bug Fixes
*
Public headers of vendored frameworks are now automatically linked in
*
Public headers of vendored frameworks are now automatically linked in
the sandbox. That allows transitive inclusion of headers from other pods.
the sandbox. That allows transitive inclusion of headers from other pods.
[
Vincent Isambart
](
https://github.com/vincentisambart
)
[
Vincent Isambart
](
https://github.com/vincentisambart
)
[
#3161
](
https://github.com/CocoaPods/CocoaPods/issues/3161
)
[
#3161
](
https://github.com/CocoaPods/CocoaPods/issues/3161
)
## 0.37.2
## 0.37.2
##### Enhancements
##### Enhancements
...
...
lib/cocoapods/downloader/cache.rb
View file @
a59bd1b8
...
@@ -19,7 +19,7 @@ module Pod
...
@@ -19,7 +19,7 @@ module Pod
#
#
def
initialize
(
root
)
def
initialize
(
root
)
@root
=
Pathname
(
root
)
@root
=
Pathname
(
root
)
@root
.
mkpath
ensure_matching_version
end
end
# Downloads the Pod from the given `request`
# Downloads the Pod from the given `request`
...
@@ -40,6 +40,21 @@ module Pod
...
@@ -40,6 +40,21 @@ module Pod
private
private
# Ensures the cache on disk was created with the same CocoaPods version as
# is currently running.
#
# @return [Void]
#
def
ensure_matching_version
version_file
=
root
+
'VERSION'
version
=
version_file
.
read
.
strip
if
version_file
.
file?
root
.
rmtree
if
version
!=
Pod
::
VERSION
&&
root
.
exist?
root
.
mkpath
version_file
.
open
(
'w'
)
{
|
f
|
f
<<
Pod
::
VERSION
}
end
# @param [Request] request
# @param [Request] request
# the request to be downloaded.
# the request to be downloaded.
#
#
...
...
spec/unit/downloader/cache_spec.rb
View file @
a59bd1b8
...
@@ -30,6 +30,15 @@ module Pod
...
@@ -30,6 +30,15 @@ module Pod
@cache
.
root
.
should
.
be
.
directory?
@cache
.
root
.
should
.
be
.
directory?
end
end
it
'implodes when the cache is from a different CocoaPods version'
do
root
=
Pathname
(
Dir
.
mktmpdir
)
root
.
+
(
'VERSION'
).
open
(
'w'
)
{
|
f
|
f
<<
'0.0.0'
}
root
.
+
(
'FILE'
).
open
(
'w'
)
{
|
f
|
f
<<
'0.0.0'
}
@cache
=
Downloader
::
Cache
.
new
(
root
)
root
.
+
(
'VERSION'
).
read
.
should
==
Pod
::
VERSION
root
.
+
(
'FILE'
).
should
.
not
.
exist?
end
it
'groups subspecs by platform'
do
it
'groups subspecs by platform'
do
@spec
=
Specification
.
new
do
|
s
|
@spec
=
Specification
.
new
do
|
s
|
s
.
ios
.
deployment_target
=
'6.0'
s
.
ios
.
deployment_target
=
'6.0'
...
...
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