Simplify bazel xcode scripts (#1639)
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user