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
2f0f9465
Commit
2f0f9465
authored
Jul 30, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3932 from dnkoutso/master
Add --sources option to push command
parents
0b643c4c
59f09980
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
CHANGELOG.md
CHANGELOG.md
+8
-1
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 @
2f0f9465
...
...
@@ -12,6 +12,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
#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
...
...
@@ -3960,4 +3966,4 @@ allowing you to automate Xcode related tasks.
[
4
]:
https://github.com/CocoaPods/Xcodeproj
[
5
]:
https://github.com/tomaz/appledoc
[
6
]:
https://github.com/CocoaPods/CocoaPods/compare/0.5.1...0.6.0
[
7
]:
https://github.com/CocoaPods/CocoaPods/compare/0.3.10...0.5.0
[
7
]:
https://github.com/CocoaPods/CocoaPods/compare/0.3.10...0.5.0
\ No newline at end of file
lib/cocoapods/command/repo/push.rb
View file @
2f0f9465
...
...
@@ -22,6 +22,9 @@ module Pod
def
self
.
options
[[
'--allow-warnings'
,
'Allows pushing even if there are warnings'
],
[
'--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
)
end
...
...
@@ -29,6 +32,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
@source_urls
=
argv
.
option
(
'sources'
,
SourcesManager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
super
...
...
@@ -84,7 +88,7 @@ module Pod
def
validate_podspec_files
UI
.
puts
"
\n
Validating
#{
'spec'
.
pluralize
(
count
)
}
"
.
yellow
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
.
use_frameworks
=
@use_frameworks
begin
...
...
spec/functional/command/repo/push_spec.rb
View file @
2f0f9465
...
...
@@ -113,6 +113,16 @@ module Pod
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
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
%i(prepare resolve_dependencies download_dependencies)
.
each
do
|
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