Skip to content

Commit

Permalink
Set xccurrentversion owners (#748)
Browse files Browse the repository at this point in the history
* Set xccurrentversion owners
* Better depset
  • Loading branch information
thiagohmcruz authored Jul 28, 2023
1 parent 2555989 commit 433a260
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions rules/precompiled_apple_resource_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,27 @@ def _precompiled_apple_resource_bundle_impl(ctx):

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

return [
AppleResourceInfo(
datamodels = xccurrentversions,
datamodels = [
(None, None, depset(xccurrentversions)),
],
unowned_resources = depset(),
owners = depset([
(output_bundle_dir.short_path, ctx.label),
(output_plist.short_path, ctx.label),
]),
owners = depset(
[
(output_bundle_dir.short_path, ctx.label),
(output_plist.short_path, ctx.label),
] + [
(f.short_path, ctx.label)
for f in xccurrentversions
],
),
# This is a list of the resources to propagate without changing further
# In this case the tuple parameters are:
# 1. The final directory the resources should end up in, ex Foo.bundle
Expand Down

0 comments on commit 433a260

Please sign in to comment.