-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resource bundle's CFBundleName #728
Conversation
@@ -121,7 +121,7 @@ def _precompiled_apple_resource_bundle_impl(ctx): | |||
control_files = [] | |||
input_files = [] | |||
output_files = [] | |||
output_bundle_dir = ctx.actions.declare_directory(paths.join(ctx.attr.name, bundle_name + ".bundle")) | |||
output_bundle_dir = ctx.actions.declare_directory(paths.join(ctx.attr.name, bundle_name + ctx.attr.bundle_extension)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't a functional change but seemed appropriate if the attribute exists already
@@ -252,7 +252,7 @@ _precompiled_apple_resource_bundle = rule( | |||
), | |||
bundle_extension = attr.string( | |||
mandatory = False, | |||
default = "bundle", | |||
default = ".bundle", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the leading period this call to paths.replace_extension
in rules_apple fails to remove the extension:
bundle_name_with_extension = bundle_name + bundle_extension
product_name = paths.replace_extension(bundle_name_with_extension, "")
# Values for string replacement substitutions to perform in the merged
# Info.plist
substitutions = {
"BUNDLE_NAME": bundle_name_with_extension,
"PRODUCT_NAME": product_name,
}
… incorrectly included the bundle extension
1c8aea9
to
3f45612
Compare
Fix issue where a resource bundle's Info.plist value for
CFBundleName
incorrectly included the bundle extension.In the generated plist: