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
47c22708
Commit
47c22708
authored
Nov 06, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rake task that dumps a Xcode project as YAML.
parent
59baa398
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
Rakefile
Rakefile
+32
-0
No files found.
Rakefile
View file @
47c22708
...
...
@@ -76,5 +76,37 @@ namespace :spec do
end
end
desc
"Dumps a Xcode project as YAML, meant for diffing"
task
:dump_xcodeproj
do
require
'yaml'
hash
=
NSDictionary
.
dictionaryWithContentsOfFile
(
File
.
join
(
ENV
[
'xcodeproj'
],
'project.pbxproj'
))
objects
=
hash
[
'objects'
]
result
=
objects
.
values
.
map
do
|
object
|
if
children
=
object
[
'children'
]
object
[
'children'
]
=
children
.
map
do
|
uuid
|
child
=
objects
[
uuid
]
child
[
'path'
]
||
child
[
'name'
]
end
.
sort
elsif
files
=
object
[
'files'
]
object
[
'files'
]
=
files
.
map
do
|
uuid
|
build_file
=
objects
[
uuid
]
file
=
objects
[
build_file
[
'fileRef'
]]
file
[
'path'
]
end
elsif
file_ref
=
object
[
'fileRef'
]
file
=
objects
[
file_ref
]
object
[
'file'
]
=
file
[
'path'
]
end
object
end
result
.
each
do
|
object
|
object
.
delete
(
'fileRef'
)
end
result
=
result
.
sort_by
do
|
object
|
[
object
[
'isa'
],
object
[
'file'
],
object
[
'path'
],
object
[
'name'
]].
compact
end
puts
result
.
to_yaml
end
desc
"Run all specs"
task
:spec
=>
'spec:all'
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