Simplify bazel xcode scripts (#1639)

This commit is contained in:
mwilsnd
2023-09-18 08:03:48 -04:00
committed by GitHub
parent 25c1f3c7a6
commit fb496dcc7c
12 changed files with 51 additions and 202 deletions

View File

@@ -1,3 +1,4 @@
# Find your team ID inside a .mobileprovision file or in your keychain (Apple development: your@email -> Get Info -> Organizational Unit)
APPLE_MOBILE_PROVISIONING_PROFILE_TEAM_ID = "TC45MCF93C"
APPLE_MOBILE_PROVISIONING_PROFILE_NAME = "iOS Team Provisioning Profile: *"
BUNDLE_ID_PREFIX = "com.firstnamelastname"
@@ -6,3 +7,8 @@ BUNDLE_ID_PREFIX = "com.firstnamelastname"
# not finding a provisioning profile when building.
# https://github.com/MobileNativeFoundation/rules_xcodeproj/blob/main/docs/bazel.md#xcodeproj-build_mode
BUILD_MODE = "bazel"
# Enter your API key for MapTiler here, if you have one.
API_KEY = "0000000000"
# Semantic version number to include in plist files.
SEM_VER = "0.0.0"

View File

@@ -1,3 +1,5 @@
load("//platform/ios/bazel:config.bzl", "API_KEY", "SEM_VER")
def info_plist(name, base_info_plist, out, **kwargs):
native.genrule(
name = name,
@@ -8,13 +10,14 @@ def info_plist(name, base_info_plist, out, **kwargs):
outs = [
out,
],
cmd = """
cmd = ("""
cp $(location {}) $@
plutil -replace MLNCommitHash -string $$(cat $(location //:git_hash)) $@
# TODO: move to file
sem_version=0.0.0
sem_version=\"""" + SEM_VER + """\"
token=\"""" + API_KEY + """\"
plutil -replace MLNSemanticVersionString -string $$sem_version $@
""".format(base_info_plist),
plutil -replace MLNApiKey -string $$token $@
""").format(base_info_plist),
**kwargs
)