devops: fix firefox-beta build (#14282)

It turns out that we can only bootstrap Firefox toolchains
from latest commits.

So in case of a full build, we have to fetch latest commit
from `master`, bootstrap from it, and then build the commit we'd like.
This commit is contained in:
Andrey Lushnikov 2022-05-19 09:08:46 -06:00 committed by GitHub
parent d6780c5b29
commit a7a7644beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View File

@ -1,2 +1,2 @@
1324
Changed: lushnikov@chromium.org Mon 16 May 2022 08:24:55 AM PDT
1325
Changed: lushnikov@chromium.org Thu May 19 17:56:07 +03 2022

View File

@ -82,10 +82,22 @@ if [[ $1 != "--juggler" ]]; then
fi
if [[ $1 == "--full" || $2 == "--full" || $1 == "--bootstrap" ]]; then
echo "ac_add_options --enable-bootstrap" >> .mozconfig
if is_mac || is_linux; then
SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser
# This is a slow but sure way to get all the necessary toolchains.
# However, it will not work if tree is dirty.
# Bail out if git repo is dirty.
if [[ -n $(git status -s --untracked-files=no) ]]; then
echo "ERROR: dirty GIT state - commit everything and re-run the script."
exit 1
fi
# 1. We have a --single-branch checkout, so we have to add a "master" branch and fetch it
git remote set-branches --add browser_upstream master
git fetch browser_upstream master
# 2. Checkout the master branch and run bootstrap from it.
git checkout browser_upstream/master
SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser
git checkout -
if [[ ! -z "${WIN32_REDIST_DIR}" ]]; then
# Having this option in .mozconfig kills incremental compilation.
echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig