Skip to content

Commit

Permalink
Collect all .xcdatamodeld instead of only .xccurrentversion
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohmcruz committed Aug 2, 2023
1 parent 433a260 commit cc61284
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rules/precompiled_apple_resource_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,17 @@ def _precompiled_apple_resource_bundle_impl(ctx):
)

# See https://github.com/bazel-ios/rules_ios/pull/747 for context
xccurrentversions = [
datamodel_files = [
f
for resource_files in ctx.attr.resources
for f in resource_files.files.to_list()
if f.extension == "xccurrentversion"
if f.path.count(".xcdatamodeld")
]

return [
AppleResourceInfo(
datamodels = [
(None, None, depset(xccurrentversions)),
(None, None, depset(datamodel_files)),
],
unowned_resources = depset(),
owners = depset(
Expand All @@ -216,7 +216,7 @@ def _precompiled_apple_resource_bundle_impl(ctx):
(output_plist.short_path, ctx.label),
] + [
(f.short_path, ctx.label)
for f in xccurrentversions
for f in datamodel_files
],
),
# This is a list of the resources to propagate without changing further
Expand Down

0 comments on commit cc61284

Please sign in to comment.