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
4a783738
Commit
4a783738
authored
Jul 01, 2016
by
arida
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
f6db4322
'
parents
eb2ab8e9
f6db4322
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
+47
-5
CHANGELOG.md
CHANGELOG.md
+8
-0
push.rb
lib/cocoapods/command/repo/push.rb
+15
-3
pods_project_generator.rb
lib/cocoapods/installer/xcode/pods_project_generator.rb
+1
-1
push_spec.rb
spec/functional/command/repo/push_spec.rb
+19
-1
pods_project_generator_spec.rb
spec/unit/installer/xcode/pods_project_generator_spec.rb
+4
-0
No files found.
CHANGELOG.md
View file @
4a783738
...
...
@@ -28,6 +28,14 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
yanzhiwei147
](
https://github.com/yanzhiwei147
)
[
#5510
](
https://github.com/CocoaPods/CocoaPods/pull/5510
)
*
Set 'Allow app extension API only' for Messages extensions.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#5558
](
https://github.com/CocoaPods/CocoaPods/issues/5558
)
*
Accept
`pod repo push`
with URL instead of only repo name
[
Mark Schall
](
https://github.com/maschall
)
[
#5572
](
https://github.com/CocoaPods/CocoaPods/pull/5572
)
##### Bug Fixes
*
Fix local pod platform conflict error message.
...
...
lib/cocoapods/command/repo/push.rb
View file @
4a783738
...
...
@@ -39,7 +39,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
@source
=
config
.
sources_manager
.
sources
([
@repo
]).
first
unless
@repo
.
nil?
@source
=
source_for_repo
@source_urls
=
argv
.
option
(
'sources'
,
config
.
sources_manager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
...
...
@@ -52,8 +52,8 @@ module Pod
def
validate!
super
help!
'A spec-repo name is required.'
unless
@repo
unless
@source
.
repo
.
directory?
help!
'A spec-repo name
or url
is required.'
unless
@repo
unless
@source
&&
@source
.
repo
.
directory?
raise
Informative
,
"Unable to find the `
#{
@repo
}
` repo. "
\
'If it has not yet been cloned, add it via `pod repo add`.'
...
...
@@ -243,6 +243,18 @@ module Pod
podspec_files
.
count
end
# Returns source for @repo
#
# @note If URL is invalid or repo doesn't exist, validate! will throw the error
#
# @return [Source]
#
def
source_for_repo
config
.
sources_manager
.
source_with_name_or_url
(
@repo
)
unless
@repo
.
nil?
rescue
nil
end
#---------------------------------------------------------------------#
end
end
...
...
lib/cocoapods/installer/xcode/pods_project_generator.rb
View file @
4a783738
...
...
@@ -185,7 +185,7 @@ module Pod
frameworks_group
=
project
.
frameworks_group
aggregate_targets
.
each
do
|
aggregate_target
|
is_app_extension
=
!
(
aggregate_target
.
user_targets
.
map
(
&
:symbol_type
)
&
[
:app_extension
,
:watch_extension
,
:watch2_extension
,
:tv_extension
]).
empty?
[
:app_extension
,
:watch_extension
,
:watch2_extension
,
:tv_extension
,
:messages_extension
]).
empty?
is_app_extension
||=
aggregate_target
.
user_targets
.
any?
{
|
ut
|
ut
.
common_resolved_build_setting
(
'APPLICATION_EXTENSION_API_ONLY'
)
==
'YES'
}
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
...
...
spec/functional/command/repo/push_spec.rb
View file @
4a783738
...
...
@@ -17,6 +17,15 @@ module Pod
end
end
it
"complains if it can't get repo url"
do
Dir
.
chdir
(
fixture
(
'banana-lib'
))
do
Command
::
Repo
::
Add
.
any_instance
.
stubs
(
:clone_repo
)
cmd
=
command
(
'repo'
,
'push'
,
'https://github.com/foo/bar.git'
)
e
=
lambda
{
cmd
.
validate!
}.
should
.
raise
Informative
e
.
message
.
should
.
include
(
'Unable to find the `https://github.com/foo/bar.git` repo'
)
end
end
it
"complains if it can't find a spec"
do
repo_make
(
'test_repo'
)
e
=
lambda
{
run_command
(
'repo'
,
'push'
,
'test_repo'
)
}.
should
.
raise
Pod
::
Informative
...
...
@@ -79,7 +88,7 @@ module Pod
File
.
open
(
temporary_directory
+
'BananaLib.podspec'
,
'w'
)
{
|
f
|
f
.
write
(
spec_clean
)
}
end
it
'refuses to push if the repo is
not clean
'
do
it
'refuses to push if the repo is
master
'
do
Dir
.
chdir
(
test_repo_path
)
do
`git remote set-url origin https://github.com/CocoaPods/Specs.git`
end
...
...
@@ -118,6 +127,15 @@ module Pod
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
end
it
'successfully pushes a spec to URL'
do
cmd
=
command
(
'repo'
,
'push'
,
@upstream
)
Dir
.
chdir
(
@upstream
)
{
`git checkout -b tmp_for_push -q`
}
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
@upstream
)
{
`git checkout master -q`
}
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
end
it
'successfully pushes converted JSON podspec'
do
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-json'
)
Dir
.
chdir
(
@upstream
)
{
`git checkout -b tmp_for_push -q`
}
...
...
spec/unit/installer/xcode/pods_project_generator_spec.rb
View file @
4a783738
...
...
@@ -209,6 +209,10 @@ module Pod
test_extension_target
(
:tv_extension
)
end
it
'configures APPLICATION_EXTENSION_API_ONLY for Messages extension targets'
do
test_extension_target
(
:messages_extension
)
end
it
'configures APPLICATION_EXTENSION_API_ONLY for targets where the user target has it set'
do
mock_user_target
=
mock
(
'UserTarget'
,
:symbol_type
=>
:application
)
mock_user_target
.
expects
(
:common_resolved_build_setting
).
with
(
'APPLICATION_EXTENSION_API_ONLY'
).
returns
(
'YES'
)
...
...
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