blob: ec4df4cbced9fb3eedd3c1f79d474792162c1447 [file] [log] [blame]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -eu
# Builds new rc binaries at head and uploads them to google storage.
# The new .sha1 files will be in the tree after this has run.
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "this script must run on a mac"
exit 1
DIR="$(cd "$(dirname "${0}" )" && pwd)"
# Make sure Linux and Windows sysroots are installed, for
$SRC_DIR/build/linux/sysroot_scripts/ --arch amd64
$SRC_DIR/build/ update --force
# Make a temporary directory.
WORK_DIR=$(mktemp -d)
if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
echo "could not create temp dir"
exit 1
function cleanup {
rm -rf "$WORK_DIR"
trap cleanup EXIT
# Check out rc and build it in the temporary directory. Copy binaries over.
pushd "$WORK_DIR" > /dev/null
git clone -q
cd hack/res
./ "$SRC_DIR"
popd > /dev/null
cp "$WORK_DIR/hack/res/rc-linux64" "$DIR/linux64/rc"
cp "$WORK_DIR/hack/res/rc-mac" "$DIR/mac/rc"
cp "$WORK_DIR/hack/res/rc-win.exe" "$DIR/win/rc.exe"
# Upload binaries to cloud storage. -b chromium-browser-clang/rc "$DIR/linux64/rc" -b chromium-browser-clang/rc "$DIR/mac/rc" -b chromium-browser-clang/rc "$DIR/win/rc.exe"