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
6b826e54
Commit
6b826e54
authored
Apr 17, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #214 from CocoaPods/CocoaPods-version.txt
[#201] Added support for CocoaPods-version.yml
parents
0be7a1e9
97e61199
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
cocoapods.rb
lib/cocoapods.rb
+1
-1
repo.rb
lib/cocoapods/command/repo.rb
+17
-0
No files found.
lib/cocoapods.rb
View file @
6b826e54
Encoding
.
default_external
=
Encoding
::
UTF_8
if
RUBY_VERSION
>
'1.8.7'
Encoding
.
default_external
=
Encoding
::
UTF_8
if
RUBY_VERSION
>
'1.8.7'
module
Pod
module
Pod
VERSION
=
'0.
5.
1'
VERSION
=
'0.
6.0rc
1'
class
Informative
<
StandardError
class
Informative
<
StandardError
end
end
...
...
lib/cocoapods/command/repo.rb
View file @
6b826e54
...
@@ -45,6 +45,7 @@ module Pod
...
@@ -45,6 +45,7 @@ module Pod
puts
"Cloning spec repo `
#{
@name
}
' from `
#{
@url
}
'"
unless
config
.
silent?
puts
"Cloning spec repo `
#{
@name
}
' from `
#{
@url
}
'"
unless
config
.
silent?
config
.
repos_dir
.
mkpath
config
.
repos_dir
.
mkpath
Dir
.
chdir
(
config
.
repos_dir
)
{
git
(
"clone '
#{
@url
}
'
#{
@name
}
"
)
}
Dir
.
chdir
(
config
.
repos_dir
)
{
git
(
"clone '
#{
@url
}
'
#{
@name
}
"
)
}
check_versions
(
dir
)
end
end
def
update
def
update
...
@@ -52,8 +53,24 @@ module Pod
...
@@ -52,8 +53,24 @@ module Pod
dirs
.
each
do
|
dir
|
dirs
.
each
do
|
dir
|
puts
"Updating spec repo `
#{
dir
.
basename
}
'"
unless
config
.
silent?
puts
"Updating spec repo `
#{
dir
.
basename
}
'"
unless
config
.
silent?
Dir
.
chdir
(
dir
)
{
git
(
"pull"
)
}
Dir
.
chdir
(
dir
)
{
git
(
"pull"
)
}
check_versions
(
dir
)
end
end
end
end
def
check_versions
(
dir
)
bin_version
=
Gem
::
Version
.
new
(
VERSION
)
yaml_file
=
dir
+
'CocoaPods-version.yml'
return
unless
yaml_file
.
exist?
data
=
YAML
.
load_file
(
yaml_file
)
min_version
=
Gem
::
Version
.
new
(
data
[
:min
])
last_version
=
Gem
::
Version
.
new
(
data
[
:last
])
if
min_version
>
bin_version
raise
Informative
,
"
\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
"
end
puts
"Cocoapods
#{
last_version
}
is available"
.
green
if
last_version
>
bin_version
end
end
end
end
end
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