Revision control

1
#!/usr/bin/env bash
2
3
# Only setup virtualenv if we intend on localizing the app.
4
function setup_virtualenv {
5
# Install Python tooling for localizations scripts
6
echo password | sudo easy_install pip
7
echo password | sudo -S pip install --upgrade pip
8
echo password | sudo -S pip install virtualenv
9
}
10
11
#
12
# Install Node.js dependencies and build user scripts
13
#
14
15
npm install
16
npm run build
17
18
#
19
# Add a badge for FirefoxBeta
20
#
21
22
if [ "$BUDDYBUILD_SCHEME" = "FirefoxBeta" ]; then
23
brew update && brew install imagemagick
24
echo password | sudo -S gem install badge
25
CF_BUNDLE_SHORT_VERSION_STRING=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" Client/Info.plist)
26
badge --no_badge --shield_no_resize --shield "$CF_BUNDLE_SHORT_VERSION_STRING-Build%20$BUDDYBUILD_BUILD_NUMBER-blue"
27
fi
28
29
#
30
# Import only the shipping locales (from shipping_locales.txt) on Release
31
# builds. Import all locales on Beta and Fennec_Enterprise, except for pull
32
# requests.
33
#
34
36
37
if [ "$BUDDYBUILD_SCHEME" = "Firefox" ]; then
38
setup_virtualenv
39
./ios-l10n-scripts/import-locales-firefox.sh --release
40
fi
41
42
if [ "$BUDDYBUILD_SCHEME" = "FirefoxBeta" ]; then
43
setup_virtualenv
44
./ios-l10n-scripts/import-locales-firefox.sh
45
fi
46
47
if [ "$BUDDYBUILD_SCHEME" = "Fennec_Enterprise" ] && [ "$BUDDYBUILD_PULL_REQUEST" = "" ]; then
48
setup_virtualenv
49
./ios-l10n-scripts/import-locales-firefox.sh
50
fi
51
52
# workaround, earlgrey needs to have dependencies downloaded before setup
54
carthage checkout
55
./Carthage/Checkouts/EarlGrey/Scripts/setup-earlgrey.sh
56
57
cd content-blocker-lib-ios
58
./build-disconnect.py block
59
./build-disconnect.py block-cookies
60
cd ..
61