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
96a7404f
Commit
96a7404f
authored
May 29, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Repo] Check for the last version supported by a repo.
parent
cdcbb414
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
repo.rb
lib/cocoapods/command/repo.rb
+4
-2
No files found.
lib/cocoapods/command/repo.rb
View file @
96a7404f
...
@@ -64,11 +64,13 @@ module Pod
...
@@ -64,11 +64,13 @@ module Pod
return
unless
yaml_file
.
exist?
return
unless
yaml_file
.
exist?
data
=
YAML
.
load_file
(
yaml_file
)
data
=
YAML
.
load_file
(
yaml_file
)
min_version
=
Gem
::
Version
.
new
(
data
[
:min
])
min_version
=
Gem
::
Version
.
new
(
data
[
:min
])
max_version
=
Gem
::
Version
.
new
(
data
[
:max
])
last_version
=
Gem
::
Version
.
new
(
data
[
:last
])
last_version
=
Gem
::
Version
.
new
(
data
[
:last
])
if
min_version
>
bin_version
if
min_version
>
bin_version
||
max_version
<
bin_version
version_msg
=
(
min_version
==
max_version
)
?
min_version
:
"
#{
min_version
}
-
#{
max_version
}
"
raise
Informative
,
raise
Informative
,
"
\n
[!] The `
#{
dir
.
basename
.
to_s
}
' repo requires CocoaPods
#{
min_version
}
\n
"
.
red
+
"
\n
[!] The `
#{
dir
.
basename
.
to_s
}
' repo requires CocoaPods
#{
min_version
}
\n
"
.
red
+
"Update Cocoapods, or checkout the appropriate tag
/commit in the repo
\n\n
"
"Update Cocoapods, or checkout the appropriate tag
in the repo.
\n\n
"
end
end
puts
"Cocoapods
#{
last_version
}
is available"
.
green
if
last_version
>
bin_version
puts
"Cocoapods
#{
last_version
}
is available"
.
green
if
last_version
>
bin_version
end
end
...
...
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