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
5dc2ed13
Commit
5dc2ed13
authored
Mar 15, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Repo::Push] Update for Source::Metadata
parent
9df63513
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
push.rb
lib/cocoapods/command/repo/push.rb
+5
-13
No files found.
lib/cocoapods/command/repo/push.rb
View file @
5dc2ed13
...
...
@@ -38,6 +38,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
@source
=
SourcesManager
.
source_with_name_or_url
(
@repo
)
@source_urls
=
argv
.
option
(
'sources'
,
SourcesManager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
...
...
@@ -161,12 +162,12 @@ module Pod
UI
.
puts
"
\n
Adding the
#{
'spec'
.
pluralize
(
count
)
}
to the `
#{
@repo
}
' repo
\n
"
.
yellow
podspec_files
.
each
do
|
spec_file
|
spec
=
Pod
::
Specification
.
from_file
(
spec_file
)
output_path
=
File
.
join
(
repo_dir
,
spec
.
name
,
spec
.
version
.
to_s
)
output_path
=
@source
.
specs_dir
+
@source
.
send
(
:pod_path
,
name
)
+
version
.
to_s
if
@message
&&
!
@message
.
empty?
message
=
@message
elsif
Pathname
.
new
(
output_path
)
.
exist?
elsif
output_path
.
exist?
message
=
"[Fix]
#{
spec
}
"
elsif
Pathname
.
new
(
File
.
join
(
repo_dir
,
spec
.
name
)).
exist
?
elsif
output_path
.
dirname
.
directory
?
message
=
"[Update]
#{
spec
}
"
else
message
=
"[Add]
#{
spec
}
"
...
...
@@ -205,16 +206,7 @@ module Pod
# @return [Pathname] The directory of the repository.
#
def
repo_dir
specs_dir
=
Pathname
.
new
(
File
.
join
(
config
.
repos_dir
,
@repo
,
'Specs'
))
dir
=
config
.
repos_dir
+
@repo
if
specs_dir
.
exist?
dir
=
specs_dir
elsif
dir
.
exist?
dir
else
raise
Informative
,
"`
#{
@repo
}
` repo not found either in
#{
specs_dir
}
or
#{
dir
}
"
end
dir
@source
.
specs_dir
end
# @return [Array<Pathname>] The path of the specifications to push.
...
...
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