Skip to content

Commit

Permalink
Document and CHANGELOG deterministic UUIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jun 30, 2015
1 parent 955fdb6 commit 010224e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Xcodeproj Changelog

## Master

##### Enhancements

* Allow transforming a project's UUIDs into predictable replacements.
[Samuel Giddins](https://github.com/segiddins)
[#175](https://github.com/CocoaPods/Xcodeproj/issues/175)


## 0.25.1

##### Bug Fixes
Expand Down
21 changes: 15 additions & 6 deletions lib/xcodeproj/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,21 @@ def save(save_path = nil)
Xcodeproj.write_plist(to_hash, file)
end

# Replaces all the UUIDs in the project with deterministic MD5 checksums.
#
# @note The current sorting of the project is taken into account when
# generating the new UUIDs.
#
# @note This method should only be used for entirely machine-generated
# projects, as true UUIDs are useful for tracking changes in the
# project.
#
# @return [void]
#
def predictabilize_uuids
UUIDGenerator.new(self).generate!
end

public

# @!group Creating objects
Expand Down Expand Up @@ -410,12 +425,6 @@ def uuids
objects_by_uuid.keys
end

# @note this should only be used for entirely machine-generated projects
#
def predictabilize_uuids
UUIDGenerator.new(self).generate!
end

# @return [Array<AbstractObject>] all the objects of the project with a
# given ISA.
#
Expand Down

0 comments on commit 010224e

Please sign in to comment.