Skip to content

Commit

Permalink
Set xccurrentversions in datamodels instead
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohmcruz committed Jul 28, 2023
1 parent ff8fa56 commit 2eb797e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rules/precompiled_apple_resource_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,17 @@ def _precompiled_apple_resource_bundle_impl(ctx):
outputs = [output_bundle_dir],
)

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

return [
AppleResourceInfo(
datamodels = xccurrentversions,
unowned_resources = depset(),
owners = depset([
(output_bundle_dir.short_path, ctx.label),
Expand All @@ -220,9 +222,6 @@ def _precompiled_apple_resource_bundle_impl(ctx):
# Foo.bundle directory that contains our real resources
unprocessed = [
(output_bundle_dir.basename, None, depset([output_bundle_dir, output_plist])),
# Handles an edge case when using `rules_xcodeproj`
# TODO: Link the PR here
(None, None, depset(xccurrentversions)),
],
),
AppleResourceBundleInfo(),
Expand Down

0 comments on commit 2eb797e

Please sign in to comment.