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
a21d1e73
Commit
a21d1e73
authored
Jul 03, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Push] Support for podspec argument.
parent
439a7912
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
push.rb
lib/cocoapods/command/push.rb
+10
-7
No files found.
lib/cocoapods/command/push.rb
View file @
a21d1e73
...
@@ -6,11 +6,11 @@ module Pod
...
@@ -6,11 +6,11 @@ module Pod
def
self
.
banner
def
self
.
banner
%{Pushing new specifications to a spec-repo:
%{Pushing new specifications to a spec-repo:
$ pod push
[REPO
]
$ pod push
REPO [NAME.podspec
]
Validates `*.podspec' in the current working dir, updates
Validates
NAME.podspec or
`*.podspec' in the current working dir, updates
the local copy of the repository named REPO, adds specifications
the local copy of the repository named REPO, adds
the
specifications
to REPO, and finally it pushes REPO to its remote.}
to
the
REPO, and finally it pushes REPO to its remote.}
end
end
def
self
.
options
def
self
.
options
...
@@ -23,6 +23,7 @@ module Pod
...
@@ -23,6 +23,7 @@ module Pod
def
initialize
(
argv
)
def
initialize
(
argv
)
@allow_warnings
=
argv
.
option
(
'--allow-warnings'
)
@allow_warnings
=
argv
.
option
(
'--allow-warnings'
)
@repo
=
argv
.
shift_argument
@repo
=
argv
.
shift_argument
@podspec
=
argv
.
shift_argument
super
unless
argv
.
empty?
&&
@repo
super
unless
argv
.
empty?
&&
@repo
end
end
...
@@ -61,7 +62,7 @@ module Pod
...
@@ -61,7 +62,7 @@ module Pod
end
end
def
podspec_files
def
podspec_files
files
=
Pathname
.
glob
(
"*.podspec"
)
files
=
Pathname
.
glob
(
@podspec
||
"*.podspec"
)
raise
Informative
,
"[!] Couldn't find .podspec file in current directory"
.
red
if
files
.
empty?
raise
Informative
,
"[!] Couldn't find .podspec file in current directory"
.
red
if
files
.
empty?
files
files
end
end
...
@@ -71,8 +72,10 @@ module Pod
...
@@ -71,8 +72,10 @@ module Pod
lint_argv
=
[
"lint"
]
lint_argv
=
[
"lint"
]
lint_argv
<<
"--only-errors"
if
@allow_warnings
lint_argv
<<
"--only-errors"
if
@allow_warnings
lint_argv
<<
"--silent"
if
config
.
silent
lint_argv
<<
"--silent"
if
config
.
silent
lint_argv
+=
podspec_files
.
map
(
&
:to_s
)
all_valid
=
true
all_valid
=
Spec
.
new
(
ARGV
.
new
(
lint_argv
)).
run
podspec_files
.
each
do
|
podspec
|
Spec
.
new
(
ARGV
.
new
(
lint_argv
+
[
podspec
.
to_s
])).
run
end
end
end
def
add_specs_to_repo
def
add_specs_to_repo
...
...
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