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
59f09980
Commit
59f09980
authored
Jul 29, 2015
by
Dimitris Koutsogiorgas
Committed by
Dimitris Couchell-Koutsogiorgas
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --sources option to push command
parent
0b643c4c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
CHANGELOG.md
CHANGELOG.md
+6
-0
push.rb
lib/cocoapods/command/repo/push.rb
+5
-1
push_spec.rb
spec/functional/command/repo/push_spec.rb
+10
-0
No files found.
CHANGELOG.md
View file @
59f09980
...
@@ -12,6 +12,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,6 +12,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3920
](
https://github.com/CocoaPods/CocoaPods/pull/3920
)
[
#3920
](
https://github.com/CocoaPods/CocoaPods/pull/3920
)
##### Enhancements
*
Add
`--sources`
option to
`push`
command.
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#3912
](
https://github.com/CocoaPods/CocoaPods/issues/3912
)
## 0.38.2
## 0.38.2
...
...
lib/cocoapods/command/repo/push.rb
View file @
59f09980
...
@@ -22,6 +22,9 @@ module Pod
...
@@ -22,6 +22,9 @@ module Pod
def
self
.
options
def
self
.
options
[[
'--allow-warnings'
,
'Allows pushing even if there are warnings'
],
[[
'--allow-warnings'
,
'Allows pushing even if there are warnings'
],
[
'--use-libraries'
,
'Linter uses static libraries to install the spec'
],
[
'--use-libraries'
,
'Linter uses static libraries to install the spec'
],
[
'--sources=https://github.com/artsy/Specs,master'
,
'The sources from which to pull dependant pods '
\
'(defaults to all available repos). '
\
'Multiple sources must be comma-delimited.'
],
[
'--local-only'
,
'Does not perform the step of pushing REPO to its remote'
]].
concat
(
super
)
[
'--local-only'
,
'Does not perform the step of pushing REPO to its remote'
]].
concat
(
super
)
end
end
...
@@ -29,6 +32,7 @@ module Pod
...
@@ -29,6 +32,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
@repo
=
argv
.
shift_argument
@source_urls
=
argv
.
option
(
'sources'
,
SourcesManager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
super
super
...
@@ -84,7 +88,7 @@ module Pod
...
@@ -84,7 +88,7 @@ module Pod
def
validate_podspec_files
def
validate_podspec_files
UI
.
puts
"
\n
Validating
#{
'spec'
.
pluralize
(
count
)
}
"
.
yellow
UI
.
puts
"
\n
Validating
#{
'spec'
.
pluralize
(
count
)
}
"
.
yellow
podspec_files
.
each
do
|
podspec
|
podspec_files
.
each
do
|
podspec
|
validator
=
Validator
.
new
(
podspec
,
SourcesManager
.
all
.
map
(
&
:url
)
)
validator
=
Validator
.
new
(
podspec
,
@source_urls
)
validator
.
allow_warnings
=
@allow_warnings
validator
.
allow_warnings
=
@allow_warnings
validator
.
use_frameworks
=
@use_frameworks
validator
.
use_frameworks
=
@use_frameworks
begin
begin
...
...
spec/functional/command/repo/push_spec.rb
View file @
59f09980
...
@@ -113,6 +113,16 @@ module Pod
...
@@ -113,6 +113,16 @@ module Pod
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
end
end
it
'initializes with default sources if no custom sources specified'
do
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
cmd
.
instance_variable_get
(
:@source_urls
).
should
.
equal
[
@upstream
.
to_s
]
end
it
'initializes with custom sources if specified'
do
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--sources=test_repo2,test_repo1'
)
cmd
.
instance_variable_get
(
:@source_urls
).
should
.
equal
%w(test_repo2 test_repo1)
end
before
do
before
do
%i(prepare resolve_dependencies download_dependencies)
.
each
do
|
m
|
%i(prepare resolve_dependencies download_dependencies)
.
each
do
|
m
|
Installer
.
any_instance
.
stubs
(
m
)
Installer
.
any_instance
.
stubs
(
m
)
...
...
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