-
-
Save sandeeplearner/7ef06c0a43eb13e1438292b441c3142a to your computer and use it in GitHub Desktop.
Add group to project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
def add_group_to_project(parentGroup, groupName, project) | |
puts "Inside add_group_to_project" | |
childGroup = parentGroup.new_group(groupName,groupName, :group) | |
fileReferenceArray = [] | |
Dir.foreach("#{parentGroup.real_path}/#{@proto_group_name}") do |child| | |
if (child == "." || child == "..") | |
puts "Ignoring file #{child}" | |
else | |
fileRefernce = childGroup.new_file(child, childGroup.source_tree) | |
fileReferenceArray << fileRefernce | |
end | |
end | |
@targets.each do |target| | |
target.add_file_references(fileReferenceArray) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment