Files
MapLibreParticleLab/platform/ios/scripts/bazel-xcodeproj.sh
Tim Sylvester 82ec59a2b0 Metal setup merge (#1616)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Alex Cristici <alex.cristici@gmail.com>
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
Co-authored-by: Stefan Karschti <stefan.karschti@gmail.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
Co-authored-by: Alex Cristici <alex@skoon.energy>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
Co-authored-by: Wei Chen <alanchenboy@gmail.com>
Co-authored-by: Siarhei Fedartsou <siarhei.fedartsou@gmail.com>
Co-authored-by: tdcosta100 <tdcosta100@gmail.com>
2023-09-13 18:35:20 +00:00

60 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -eo pipefail
echo "------ Determining Maplibre version and hash ------"
sem_version=0.0.0
hash=$(git log | head -1 | awk '{ print $2 }' | cut -c 1-10) && true
echo "------ Configuring project ------"
# Build parameters
token_file=~/.maplibre
token_file2=~/maplibre
token="$(cat $token_file 2>/dev/null || cat $token_file2 2>/dev/null || echo $MLN_API_KEY)"
flavor="legacy" # Renderer build flavor: legacy, drawable, split
args=("--sem-ver" "$sem_version" "--hash" "$hash")
while [[ $# -gt 0 ]]; do
case $1 in
--flavor)
shift
flavor="$1"
shift
;;
--teamid)
shift
args+=("--team-id" "$1")
shift
;;
--bundleidprefix)
shift
args+=("--bundleidprefix" "$1")
shift
;;
--apikey)
shift
token="$1"
shift
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
esac
done
if [ ! -z "$token" ]; then
args+=("--token" "$token")
fi
bash "platform/ios/scripts/bazel-generate-plists.sh" "${args[@]}"
echo "------ Building Maplibre version: $sem_version hash: $hash ------"
# Generate the Xcode project
# Example invocation: ./bazel-xcodeproj.sh flavor split teamid 1234567890
# Find your team ID inside a .mobileprovision file or in your keychain (Apple development: your@email -> Get Info -> Organizational Unit)
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=$flavor --//:maplibre_platform=ios"