forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buddybuild_prebuild.sh
executable file
·56 lines (46 loc) · 2.17 KB
/
buddybuild_prebuild.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
chruby 2.3.1
bundle install
bundle exec danger --fail-on-errors=false
#
# Add our Adjust keys to the build depending on the scheme. We use the sandbox for beta so
# that we have some insight in beta usage.
#
if [ "$BUDDYBUILD_SCHEME" == FirefoxBeta ]; then
echo "Setting Adjust environment to SANDBOX for $BUDDYBUILD_SCHEME"
/usr/libexec/PlistBuddy -c "Set AdjustAppToken $ADJUST_KEY_BETA" "Client/Info.plist"
/usr/libexec/PlistBuddy -c "Set AdjustEnvironment production" "Client/Info.plist"
elif [ "$BUDDYBUILD_SCHEME" == Firefox ]; then
echo "Setting Adjust environment to PRODUCTION for $BUDDYBUILD_SCHEME"
/usr/libexec/PlistBuddy -c "Set AdjustAppToken $ADJUST_KEY_PRODUCTION" "Client/Info.plist"
/usr/libexec/PlistBuddy -c "Set AdjustEnvironment production" "Client/Info.plist"
fi
#
# Leanplum is included only for the Firefox and FirefoxBeta builds.
#
if [ "$BUDDYBUILD_SCHEME" = "Firefox" ] || [ "$BUDDYBUILD_SCHEME" = "FirefoxBeta" ]; then
echo "Setting Leanplum environment to PRODUCTION for $BUDDYBUILD_SCHEME"
/usr/libexec/PlistBuddy -c "Set LeanplumAppId $LEANPLUM_APP_ID" "Client/Info.plist"
/usr/libexec/PlistBuddy -c "Set LeanplumProductionKey $LEANPLUM_KEY_PRODUCTION" "Client/Info.plist"
/usr/libexec/PlistBuddy -c "Set LeanplumDevelopmentKey $LEANPLUM_KEY_DEVELOPMENT" "Client/Info.plist"
fi
echo "Setting up Pocket Stories API Key"
if [ "$BUDDYBUILD_SCHEME" == Firefox ]; then
/usr/libexec/PlistBuddy -c "Set PocketEnvironmentAPIKey $POCKET_PRODUCTION_API_KEY" "Client/Info.plist"
else
/usr/libexec/PlistBuddy -c "Set PocketEnvironmentAPIKey $POCKET_STAGING_API_KEY" "Client/Info.plist"
fi
#
# Setup Sentry. We have different DSNs for Beta and Production.
#
if [ "$BUDDYBUILD_SCHEME" == FirefoxBeta ]; then
echo "Setting SentryDSN to $SENTRY_DSN_BETA_180"
/usr/libexec/PlistBuddy -c "Set SentryDSN $SENTRY_DSN_BETA_180" "Client/Info.plist"
elif [ "$BUDDYBUILD_SCHEME" == Firefox ]; then
echo "Setting SentryDSN to $SENTRY_DSN_RELEASE_180"
/usr/libexec/PlistBuddy -c "Set SentryDSN $SENTRY_DSN_RELEASE_180" "Client/Info.plist"
fi
#
# Set the build number to match the Buddybuild number
#
agvtool new-version -all "$BUDDYBUILD_BUILD_NUMBER"