forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buddybuild_postclone.sh
executable file
·55 lines (44 loc) · 1.61 KB
/
buddybuild_postclone.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
#!/usr/bin/env bash
# Only setup virtualenv if we intend on localizing the app.
function setup_virtualenv {
# Install Python tooling for localizations scripts
echo password | sudo easy_install pip
echo password | sudo -S pip install --upgrade pip
echo password | sudo -S pip install virtualenv
}
#
# Install Node.js dependencies and build user scripts
#
npm install
npm run build
#
# Add a badge for FirefoxBeta
#
if [ "$BUDDYBUILD_SCHEME" = "FirefoxBeta" ]; then
brew update && brew install imagemagick
echo password | sudo -S gem install badge
CF_BUNDLE_SHORT_VERSION_STRING=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" Client/Info.plist)
badge --no_badge --shield_no_resize --shield "$CF_BUNDLE_SHORT_VERSION_STRING-Build%20$BUDDYBUILD_BUILD_NUMBER-blue"
fi
#
# Import only the shipping locales (from shipping_locales.txt) on Release
# builds. Import all locales on Beta and Fennec_Enterprise, except for pull
# requests.
#
git clone https://github.com/mozilla-mobile/ios-l10n-scripts.git || exit 1
if [ "$BUDDYBUILD_SCHEME" = "Firefox" ]; then
setup_virtualenv
./ios-l10n-scripts/import-locales-firefox.sh --release
fi
if [ "$BUDDYBUILD_SCHEME" = "FirefoxBeta" ]; then
setup_virtualenv
./ios-l10n-scripts/import-locales-firefox.sh
fi
if [ "$BUDDYBUILD_SCHEME" = "Fennec_Enterprise" ] && [ "$BUDDYBUILD_PULL_REQUEST" = "" ]; then
setup_virtualenv
./ios-l10n-scripts/import-locales-firefox.sh
fi
# workaround, earlgrey needs to have dependencies downloaded before setup
# https://github.com/google/EarlGrey/issues/732
carthage checkout
./Carthage/Checkouts/EarlGrey/Scripts/setup-earlgrey.sh