skia2/tools/sync_google3.sh
benjaminwagner 964eebae2d Include resources directory in google3 sync.
Also other minor improvements in sync scripts.

In BUILD.public, include all files under resources as data dependencies for DM. Omit newly failing DM tests and add newly passing DM tests.

Adds the OpenClipart "license" to LICENSE per comment in google3 CL 100158380.

Corresponding google3 CL is 105602927.

BUG=skia:

Review URL: https://codereview.chromium.org/1406283002
2015-10-20 13:00:48 -07:00

54 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Syncs //depot/google3/third_party/skia/HEAD to the last known good revision of
# Skia. If this script is not run from a Piper client, creates a new CitC
# client. Also updates README.google.
#
# Usage:
# ./tools/sync_google3.sh
prodcertstatus -q || (echo "Please run prodaccess." 1>&2; exit 1)
source gbash.sh || exit 2
set -e
MY_DIR="$(gbash::get_absolute_caller_dir)"
LKGR="$(${MY_DIR}/get_skia_lkgr.sh)"
gbash::get_google3_dir && GOOGLE3="$(gbash::get_google3_dir)"
if [ -z "${GOOGLE3}" ]; then
CLIENT_NAME="sync_skia_$(date '+%F-%H-%M-%S')"
${MY_DIR}/create_skia_google3_client.sh "${CLIENT_NAME}"
GOOGLE3="/google/src/cloud/${USER}/${CLIENT_NAME}/google3"
fi
cd "${GOOGLE3}/third_party/skia/HEAD"
${MY_DIR}/git_clone_to_google3.sh --skia_rev "${LKGR}"
echo "Synced client ${CLIENT_NAME} to ${LKGR}"
# Update README.google.
sed --in-place "s/^Version: .*/Version: ${LKGR}/" README.google
sed --in-place "s/URL: http:\/\/skia.googlesource.com\/skia\/+archive\/.*\.tar\.gz/URL: http:\/\/skia.googlesource.com\/skia\/+archive\/${LKGR}.tar.gz/" README.google
CURRENT_DATE=`date '+%d %B %Y'`
echo "Updated using sync_google3.sh on $CURRENT_DATE by $USER@google.com" >> README.google
# Add README.google to the default change.
g4 reopen
# Create a new CL.
CHANGE="$(g4 change --desc "Update skia HEAD to ${LKGR}.")"
CL="$(echo "${CHANGE}" | sed "s/Change \([0-9]\+\) created.*/\1/")"
echo "Created CL ${CL} (http://cl/${CL})"
# Run presubmit (will run TAP tests).
if g4 presubmit -c "${CL}"; then
echo "CL is ready for review and submit at http://cl/${CL}"
else
echo "Presubmit failed for CL ${CL} in client ${CLIENT_NAME}" 1>&2
exit 3
fi