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
9b6813f5
Commit
9b6813f5
authored
Oct 30, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Rakefile] Iteratively build all Examples
parent
b99ce415
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
Rakefile
Rakefile
+22
-9
contents.xcworkspacedata
...ing Example/Examples.xcworkspace/contents.xcworkspacedata
+0
-0
Podfile
examples/AFNetworking Example/Podfile
+1
-1
No files found.
Rakefile
View file @
9b6813f5
...
@@ -221,8 +221,12 @@ begin
...
@@ -221,8 +221,12 @@ begin
desc
"Build all examples"
desc
"Build all examples"
task
:build
do
task
:build
do
Dir
.
chdir
(
"examples/AFNetworking Example"
)
do
require
'xcodeproj'
puts
"Installing Pods"
Dir
[
'examples/*'
].
each
do
|
dir
|
Dir
.
chdir
(
dir
)
do
puts
"Example:
#{
dir
}
"
puts
" Installing Pods"
# pod_command = ENV['FROM_GEM'] ? 'sandbox-pod' : 'bundle exec ../../bin/sandbox-pod'
# pod_command = ENV['FROM_GEM'] ? 'sandbox-pod' : 'bundle exec ../../bin/sandbox-pod'
# TODO: The sandbox is blocking local git repos making bundler crash
# TODO: The sandbox is blocking local git repos making bundler crash
pod_command
=
ENV
[
'FROM_GEM'
]
?
'sandbox-pod'
:
'bundle exec ../../bin/pod'
pod_command
=
ENV
[
'FROM_GEM'
]
?
'sandbox-pod'
:
'bundle exec ../../bin/pod'
...
@@ -230,17 +234,26 @@ begin
...
@@ -230,17 +234,26 @@ begin
execute_command
"rm -rf Pods"
execute_command
"rm -rf Pods"
execute_command
"
#{
pod_command
}
install --verbose --no-repo-update"
execute_command
"
#{
pod_command
}
install --verbose --no-repo-update"
puts
"Building example: AFNetworking Mac Example"
workspace_path
=
'Examples.xcworkspace'
execute_command
"xcodebuild -workspace 'AFNetworking Examples.xcworkspace' -scheme 'AFNetworking Example' clean build"
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
workspace_path
)
workspace
.
schemes
.
each
do
|
scheme_name
,
project_path
|
next
if
scheme_name
==
'Pods'
puts
" Building scheme:
#{
scheme_name
}
"
project
=
Xcodeproj
::
Project
.
open
(
project_path
)
target
=
project
.
targets
.
first
puts
"Building example: AFNetworking iOS Example"
case
target
when
:osx
execute_command
"xcodebuild -workspace '
#{
workspace_path
}
' -scheme '
#{
scheme_name
}
' clean build"
when
:ios
xcode_version
=
`xcodebuild -version`
.
scan
(
/Xcode (.*)\n/
).
first
.
first
xcode_version
=
`xcodebuild -version`
.
scan
(
/Xcode (.*)\n/
).
first
.
first
major_version
=
xcode_version
.
split
(
'.'
).
first
.
to_i
major_version
=
xcode_version
.
split
(
'.'
).
first
.
to_i
# Specifically build against the simulator SDK so we don't have to deal with code signing.
# Specifically build against the simulator SDK so we don't have to deal with code signing.
if
major_version
>
5
simulator_name
=
major_version
>
5
?
'iPhone 6'
:
'iPhone Retina (4-inch)'
execute_command
"xcodebuild -workspace 'AFNetworking Examples.xcworkspace' -scheme 'AFNetworking iOS Example' clean build ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 6'
"
execute_command
"xcodebuild -workspace '
#{
workspace_path
}
' -scheme '
#{
scheme_name
}
' clean build ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=
#{
simulator_name
}
"
else
end
e
xecute_command
"xcodebuild -workspace 'AFNetworking Examples.xcworkspace' -scheme 'AFNetworking iOS Example' clean build ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch)'"
e
nd
end
end
end
end
end
end
...
...
examples/AFNetworking Example/
AFNetworking
Examples.xcworkspace/contents.xcworkspacedata
→
examples/AFNetworking Example/Examples.xcworkspace/contents.xcworkspacedata
View file @
9b6813f5
File moved
examples/AFNetworking Example/Podfile
View file @
9b6813f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
xcodeproj
"AFNetworking Mac Example.xcodeproj"
xcodeproj
"AFNetworking Mac Example.xcodeproj"
####
####
workspace
'
AFNetworking
Examples.xcworkspace'
workspace
'Examples.xcworkspace'
target
"AFNetworking Example"
do
target
"AFNetworking Example"
do
platform
:osx
,
'10.8'
platform
:osx
,
'10.8'
...
...
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