blob: e2842a470726b3a967edacd9193b5571f801366c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/usr/bin/env bash
set -e
set -o pipefail
set -u
cd build/ios/pkg
rm -rf framework
mkdir framework
cd framework
mkdir Mapbox.framework
# headers
cp -rv ../static/Headers Mapbox.framework/Headers
cat ../../../../ios/framework/umbrella >> Mapbox.framework/Headers/Mapbox.h
# resources
cp -rv ../static/Mapbox.bundle Mapbox.framework/Mapbox.bundle
# license
cp -v ../../../../LICENSE.md Mapbox.framework
# settings bundle
cp -rv ../../../../ios/framework/Settings.bundle Mapbox.framework/Settings.bundle
# binary
cp -v ../static/libMapbox.a Mapbox.framework/Mapbox
strip -Sx Mapbox.framework/Mapbox
# module map
mkdir Mapbox.framework/Modules
cp -v ../../../../ios/framework/modulemap Mapbox.framework/Modules/module.modulemap
# Info.plist
VERSION=$( git tag | grep ^ios | sed 's/^ios-//' | sort -r | grep -v '\-rc.' | grep -v '\-pre.' | sed -n '1p' | sed 's/^v//' )
echo "Using $VERSION for Info.plist. Note that you will need to manually update the product for pre-releases or release candidates."
cp -v ../../../../ios/framework/Info.plist Mapbox.framework
perl -pi -e "s/#####/$VERSION/" Mapbox.framework/Info.plist
perl -pi -e "s/%%%%%/$VERSION/" Mapbox.framework/Info.plist
|