Andrey Lushnikov fcc1680f98
devops: revision Chromium repackaged builds separately (#3698)
Currently, we mirror Chromium revisions from gbuckets to our cdn and
name them same way as Chromium revision.

However, with the upcoming bundling of FFMPEG, we'd like to revision
Chromium packages separately, since our Chromium package will depend from
a number of factors:
- chromium upstream revision
- ffmpeg version
- extra files to add to the package or remove from the package

We should be able to produce a new Chromium build once any of these changes.

With this patch, to roll Chromium browser:
- update chromium revision number in the
`//browser_patches/chromium/UPSTREAM_CONFIG.sh`
- bump the build number in the `//browser_patches/chromium/BUILD_NUMBER`

Reference #3680
2020-08-31 10:44:33 -07:00

46 lines
976 B
Bash
Executable File

#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
source "./UPSTREAM_CONFIG.sh"
mkdir -p output
cd output
FOLDER_NAME=""
ZIP_NAME=""
FILES_TO_REMOVE=()
if [[ $1 == "--win32" ]]; then
FOLDER_NAME="Win"
ZIP_NAME="chrome-win.zip"
FILES_TO_REMOVE+=("chrome-win/interactive_ui_tests.exe")
elif [[ $1 == "--win64" ]]; then
FOLDER_NAME="Win_x64"
ZIP_NAME="chrome-win.zip"
FILES_TO_REMOVE+=("chrome-win/interactive_ui_tests.exe")
elif [[ $1 == "--mac" ]]; then
FOLDER_NAME="Mac"
ZIP_NAME="chrome-mac.zip"
elif [[ $1 == "--linux" ]]; then
FOLDER_NAME="Linux_x64"
ZIP_NAME="chrome-linux.zip"
else
echo "ERROR: unknown platform to build: $1"
exit 1
fi
URL="https://storage.googleapis.com/chromium-browser-snapshots/${FOLDER_NAME}/${UPSTREAM_CHROMIUM_REVISION}/${ZIP_NAME}"
curl --output upstream.zip "${URL}"
unzip upstream.zip
for file in ${FILES_TO_REMOVE[@]}; do
rm -f "${file}"
done
zip --symlinks -r build.zip ${ZIP_NAME%.zip}