Skip to content

Commit a005463

Browse files
benmartenEnuviel
authored andcommitted
build(build.sh): change name of global path config var
1 parent fb66274 commit a005463

File tree

2 files changed

+37
-26
lines changed

2 files changed

+37
-26
lines changed

Example/Leanplum-SDK.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
54BC995C354D98C2090B0509 /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */; };
10+
4D5A32F652662A8CC221AAF8 /* Pods_Leanplum_SDK_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */; };
1111
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
1212
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
1313
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -26,7 +26,7 @@
2626
B5CCCA331D74B64D005ADEE1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA321D74B64D005ADEE1 /* ViewController.m */; };
2727
B5CCCA361D74B64D005ADEE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA341D74B64D005ADEE1 /* Main.storyboard */; };
2828
B5CCCA381D74B64D005ADEE1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA371D74B64D005ADEE1 /* Assets.xcassets */; };
29-
D79223862565003C52D8C1BD /* libPods-Leanplum-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */; };
29+
CC927D3CDC15A28D0E164F51 /* Pods_Leanplum_tvOS_SDK_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */; };
3030
/* End PBXBuildFile section */
3131

3232
/* Begin PBXContainerItemProxy section */
@@ -42,6 +42,7 @@
4242
/* Begin PBXFileReference section */
4343
1982CE36FE54461D3A24D6B5 /* Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-tvOS-SDK_Example/Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig"; sourceTree = "<group>"; };
4444
29ABF5FA9E1826C5BBE433C9 /* Pods-Leanplum-SDK_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-SDK_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-SDK_Tests/Pods-Leanplum-SDK_Tests.debug.xcconfig"; sourceTree = "<group>"; };
45+
4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_SDK_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4546
6003F58A195388D20070C39A /* Leanplum-SDK_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Leanplum-SDK_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4647
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4748
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -60,15 +61,14 @@
6061
6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
6162
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6263
606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
63-
6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6464
73B565AA61D6B6A4E92607C4 /* Pods-Leanplum-SDK_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-SDK_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-SDK_Tests/Pods-Leanplum-SDK_Tests.release.xcconfig"; sourceTree = "<group>"; };
6565
742DDA885B7E0DC4FD74AD80 /* Leanplum-SDK.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "Leanplum-SDK.podspec"; path = "../Leanplum-SDK.podspec"; sourceTree = "<group>"; };
6666
74C2EA3F2D53CAE77A03BFFA /* Pods-Leanplum-tvOS-SDK_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-tvOS-SDK_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-tvOS-SDK_Example/Pods-Leanplum-tvOS-SDK_Example.release.xcconfig"; sourceTree = "<group>"; };
6767
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_SDK_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6868
84A3C33C701600A874B8C63F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
6969
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
70-
8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-tvOS-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7170
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
71+
A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_tvOS_SDK_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7272
B5CCCA291D74B64D005ADEE1 /* Leanplum-tvOS-SDK_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Leanplum-tvOS-SDK_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
7373
B5CCCA2C1D74B64D005ADEE1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
7474
B5CCCA2E1D74B64D005ADEE1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -91,7 +91,7 @@
9191
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
9292
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
9393
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
94-
D79223862565003C52D8C1BD /* libPods-Leanplum-SDK_Example.a in Frameworks */,
94+
4D5A32F652662A8CC221AAF8 /* Pods_Leanplum_SDK_Example.framework in Frameworks */,
9595
);
9696
runOnlyForDeploymentPostprocessing = 0;
9797
};
@@ -109,7 +109,7 @@
109109
isa = PBXFrameworksBuildPhase;
110110
buildActionMask = 2147483647;
111111
files = (
112-
54BC995C354D98C2090B0509 /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */,
112+
CC927D3CDC15A28D0E164F51 /* Pods_Leanplum_tvOS_SDK_Example.framework in Frameworks */,
113113
);
114114
runOnlyForDeploymentPostprocessing = 0;
115115
};
@@ -148,8 +148,8 @@
148148
6003F5AF195388D20070C39A /* XCTest.framework */,
149149
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */,
150150
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */,
151-
6B5512CA4EF720C80A7B79F2 /* libPods-Leanplum-SDK_Example.a */,
152-
8C19A3414A20DDBDA72ED71D /* libPods-Leanplum-tvOS-SDK_Example.a */,
151+
4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */,
152+
A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */,
153153
);
154154
name = Frameworks;
155155
sourceTree = "<group>";

build.sh

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ main() {
6969
fi
7070
export IOS_VERSION_STRING="$IOS_VERSION+$BUILD_NUMBER"
7171

72-
LEANPLUM_SDK_ROOT=${LEANPLUM_SDK_ROOT:-"$(pwd)/."}
73-
RELEASE_DIR_BASE=${RELEASE_DIR_BASE:-"$LEANPLUM_SDK_ROOT/Release"}
72+
SDK_DIR=${SDK_DIR:-"$(pwd)/."}
73+
RELEASE_DIR_BASE=${RELEASE_DIR_BASE:-"$SDK_DIR/Release"}
74+
LEANPLUM_PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER:-"s"}
7475
CONFIGURATION=${CONFIGURATION:-"Release"}
7576
BUILD_DIR=${BUILD_DIR:-"/tmp/AppleSDK-build"}
7677
BUILD_ROOT=${BUILD_ROOT:-"/tmp/AppleSDK-build"}
@@ -100,19 +101,19 @@ main() {
100101
mkdir -p "$RELEASE_DIR"
101102

102103
# Build Dynamic Framework
103-
cd "$LEANPLUM_SDK_ROOT/Example/"
104+
cd "$SDK_DIR/Example/"
104105
pod install
105-
cd "$LEANPLUM_SDK_ROOT/Example/Pods"
106+
cd "$SDK_DIR/Example/Pods"
106107
build_ios_dylib
107108

108109
# Build Static Framework
109110
RELEASE_DIR="$RELEASE_DIR_BASE/static"
110111
mkdir -p "$RELEASE_DIR"
111112

112113
export LP_STATIC=1
113-
cd "$LEANPLUM_SDK_ROOT/Example/"
114+
cd "$SDK_DIR/Example/"
114115
pod install
115-
cd "$LEANPLUM_SDK_ROOT/Example/Pods"
116+
cd "$SDK_DIR/Example/Pods"
116117
build_ios
117118

118119
echo "${GREEN} Done.${NORMAL}"
@@ -133,23 +134,28 @@ build_ios() {
133134
run "Building Leanplum-SDK (device/armv7) target ..." \
134135
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
135136
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
136-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
137+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
138+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
137139
run "Building Leanplum-SDK (device/armv7s) target ..." \
138140
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
139141
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
140-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
142+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
143+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
141144
run "Building Leanplum-SDK (device/arm64) target ..." \
142145
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
143146
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
144-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
147+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
148+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
145149
run "Building Leanplum-SDK (simulator/i386) target ..." \
146150
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
147151
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
148-
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
152+
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
153+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
149154
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
150155
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
151156
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
152-
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
157+
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
158+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
153159

154160
mkdir "${RELEASE_DIR}/Leanplum.framework/"
155161
run "Combining builds to universal fat library ..." \
@@ -176,8 +182,8 @@ framework module Leanplum {
176182
EOF
177183

178184
# Copy headers.
179-
cp "$LEANPLUM_SDK_ROOT/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
180-
cp "$LEANPLUM_SDK_ROOT/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
185+
cp "$SDK_DIR/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
186+
cp "$SDK_DIR/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
181187

182188
printf "%s\n" "Successfully built Leanplum-SDK (iOS) Framework."
183189
}
@@ -197,23 +203,28 @@ build_ios_dylib() {
197203
run "Building Leanplum-SDK (device/armv7) target ..." \
198204
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
199205
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
200-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
206+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
207+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
201208
run "Building Leanplum-SDK (device/armv7s) target ..." \
202209
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
203210
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
204-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
211+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
212+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
205213
run "Building Leanplum-SDK (device/arm64) target ..." \
206214
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${DEVICE_SDK}" \
207215
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
208-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
216+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
217+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
209218
run "Building Leanplum-SDK (simulator/i386) target ..." \
210219
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
211220
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
212-
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
221+
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
222+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
213223
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
214224
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source" -sdk "${SIM_SDK}" \
215225
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
216-
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
226+
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
227+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
217228

218229
run "Combining builds to universal fat library ..." \
219230
lipo -create -output "${RELEASE_DIR}/Leanplum" \

0 commit comments

Comments
 (0)