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
e749faab
Commit
e749faab
authored
Apr 06, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Get `pod install` to work and run `rake examples:build` in the sandbox.
parent
817af7c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
+39
-10
Rakefile
Rakefile
+1
-1
sandbox-pod
bin/sandbox-pod
+38
-9
No files found.
Rakefile
View file @
e749faab
...
@@ -323,7 +323,7 @@ namespace :examples do
...
@@ -323,7 +323,7 @@ namespace :examples do
puts
"Building example:
#{
example
}
"
puts
"Building example:
#{
example
}
"
Dir
.
chdir
(
example
.
to_s
)
do
Dir
.
chdir
(
example
.
to_s
)
do
execute_command
"rm -rf Pods DerivedData"
execute_command
"rm -rf Pods DerivedData"
execute_command
"
#{
'../../bin/'
unless
ENV
[
'FROM_GEM'
]
}
pod install --verbose --no-update"
execute_command
"
#{
'../../bin/'
unless
ENV
[
'FROM_GEM'
]
}
sandbox-
pod install --verbose --no-update"
command
=
"xcodebuild -workspace '
#{
example
.
basename
}
.xcworkspace' -scheme '
#{
example
.
basename
}
'"
command
=
"xcodebuild -workspace '
#{
example
.
basename
}
.xcworkspace' -scheme '
#{
example
.
basename
}
'"
if
(
example
+
'Podfile'
).
read
.
include?
(
'platform :ios'
)
if
(
example
+
'Podfile'
).
read
.
include?
(
'platform :ios'
)
# 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.
...
...
bin/sandbox-pod
View file @
e749faab
...
@@ -11,10 +11,16 @@ require 'cocoapods/config'
...
@@ -11,10 +11,16 @@ require 'cocoapods/config'
pod_bin
=
File
.
expand_path
(
'../pod'
,
__FILE__
)
pod_bin
=
File
.
expand_path
(
'../pod'
,
__FILE__
)
pod_
root
=
File
.
expand_path
(
'../..'
,
pod_bin
)
pod_
prefix
=
File
.
expand_path
(
'../..'
,
pod_bin
)
ruby_bin
=
`rbenv which ruby`
.
strip
ruby_bin
=
`rbenv which ruby`
.
strip
ruby_root
=
File
.
expand_path
(
'../..'
,
ruby_bin
)
ruby_prefix
=
File
.
expand_path
(
'../..'
,
ruby_bin
)
# TODO how are we going to handle the required tools in the PATH? e.g. git, svn, hg
homebrew_prefix
=
`brew --prefix`
.
strip
developer_prefix
=
`xcode-select --print-path`
.
strip
xcode_app_path
=
File
.
expand_path
(
'../..'
,
developer_prefix
)
require
'erb'
require
'erb'
...
@@ -38,11 +44,25 @@ __END__
...
@@ -38,11 +44,25 @@ __END__
(allow mach-lookup)
(allow mach-lookup)
(allow ipc-posix-shm)
(allow ipc-posix-shm)
(allow process-fork)
(allow process-fork)
(allow system-socket)
; TODO this doesn’t actually work atm, because appledoc needs to be code signed for apple events to be allowed.
; Needed for appldoc to install a docset
; (allow appleevent-send)
; TODO see if we can restrict this too
;(allow network-outbound (literal "/private/var/run/mDNSResponder"))
(allow network-outbound)
(allow process-exec
(allow process-exec
(regex
(regex
#"^<%= pod_bin %>"
#"^<%= pod_bin %>"
#"^<%= ruby_bin %>"
#"^<%= ruby_bin %>"
#"^<%= homebrew_prefix %>"
#"^<%= File.join(developer_prefix, 'usr/bin/xcrun') %>"
#"^<%= File.join(developer_prefix, 'usr/bin/xcodebuild') %>"
#"^<%= File.join(developer_prefix, 'usr/bin/docsetutil') %>" ; Needed for appledoc
#"^/bin/*"
#"^/usr/bin/*"
#"^/usr/bin/*"
)
)
)
)
...
@@ -50,16 +70,22 @@ __END__
...
@@ -50,16 +70,22 @@ __END__
;; Allow these reads:
;; Allow these reads:
(allow file-read*
(allow file-read*
(regex
(regex
#"^/Users/[^.]+/.gemrc"
; TODO see if we can restrict this more, but it's going to be hard
#"^/Users/[^.]+/.gem/*"
#"^/Users/[^.]+/*"
;#"^/Users/[^.]+/.netrc"
;#"^/Users/[^.]+/.gemrc"
;#"^/Users/[^.]+/.gem/*"
;#"^/Users/[^.]+/Library/.*"
#"^/Library/*"
#"^/Library/*"
#"^/System/Library/*"
#"^/System/Library/*"
#"^/usr/lib/*"
#"^/usr/lib/*"
#"^/usr/share/*"
#"^/usr/share/*"
#"^/private/*"
#"^/private/*"
#"^/dev/*"
#"^/dev/*"
#"^<%= File.join(ruby_root, '*') %>"
#"^<%= homebrew_prefix %>"
#"^<%= File.join(pod_root, '*') %>"
#"^<%= ruby_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= xcode_app_path %>"
#"^<%= Pod::Config.instance.repos_dir %>"
#"^<%= Pod::Config.instance.repos_dir %>"
)
)
)
)
...
@@ -67,10 +93,13 @@ __END__
...
@@ -67,10 +93,13 @@ __END__
;; Allow these writes:
;; Allow these writes:
(allow file-write*
(allow file-write*
(regex
(regex
#"^<%=
File.join(Pod::Config.instance.project_root, '*')
%>"
#"^<%=
Pod::Config.instance.project_root
%>"
;#"^/Users/[^.]+/Library/.
*"
#"^/Users/[^.]+/Library/Caches/CocoaPods/
*"
;#"^/private/var/*
"
#"^/Users/[^.]+/Library/Developer/Shared/Documentation/DocSets
"
#"^/dev/dtracehelper"
#"^/dev/dtracehelper"
#"^/dev/tty"
#"^/dev/null"
#"^/private/var"
)
)
)
)
...
...
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