aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar benjaminwagner <benjaminwagner@google.com>2016-01-11 10:35:46 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-11 10:35:46 -0800
commitcc16c598d7f3411985378abe4bc94764eb1f8ec3 (patch)
tree1b8eca1f3c47344ba6c40c9c58748fbe2357e1de
parent65859ec6ac3b9ab5bc3d2b60243d64f88189f53f (diff)
Remove Google3 scripts.
-rwxr-xr-xtools/create_skia_google3_client.sh27
-rwxr-xr-xtools/git_clone_to_google3.sh96
-rwxr-xr-xtools/sync_google3.sh75
3 files changed, 0 insertions, 198 deletions
diff --git a/tools/create_skia_google3_client.sh b/tools/create_skia_google3_client.sh
deleted file mode 100755
index 91c1bb1feb..0000000000
--- a/tools/create_skia_google3_client.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/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.
-
-# Create a google3 CitC client in which code can be submitted to either google3
-# or Git.
-#
-# Usage:
-# ./tools/create_skia_google3_client.sh <client_name>
-
-prodcertstatus -q || (echo "Please run prodaccess." 1>&2; exit 1)
-source gbash.sh || exit 2
-
-set -e
-
-CLIENT="$1"
-g4 citc "${CLIENT}"
-cd "/google/src/cloud/${USER}/${CLIENT}/google3/third_party/skia/HEAD"
-
-REV="$(cat README.google | grep -e "^Version" | sed "s/^Version: \(.*\)/\1/")"
-
-MY_DIR="$(gbash::get_absolute_caller_dir)"
-${MY_DIR}/git_clone_to_google3.sh --skia_rev "${REV}"
-
-echo "Created client ${CLIENT} synced to ${REV}"
diff --git a/tools/git_clone_to_google3.sh b/tools/git_clone_to_google3.sh
deleted file mode 100755
index e9f041ca0a..0000000000
--- a/tools/git_clone_to_google3.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/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.
-
-# Crude script to clone the git skia repo into the current directory, which
-# must be a CitC client.
-#
-# Usage:
-# ./tools/git_clone_to_google3.sh
-
-prodcertstatus -q || (echo "Please run prodaccess." 1>&2; exit 1)
-source gbash.sh || exit 2
-
-DEFINE_string skia_rev "" "Git hash of Skia revision to clone, default latest."
-gbash::init_google "$@"
-
-set -e
-
-# Checkout specified revision of Skia in a temp location.
-TMP=$(gbash::make_temp_dir)
-pushd "${TMP}"
-git clone https://skia.googlesource.com/skia
-cd skia
-git fetch
-if [[ -z "${FLAGS_skia_rev}" ]]; then
- # Retrieve latest revision.
- FLAGS_skia_rev="$(git show --format=%H --no-patch origin/master)"
-fi
-git checkout --detach "${FLAGS_skia_rev}"
-
-# Rsync to google3 location.
-popd
-# Use multichange client in case there are too many files for nomultichange. http://b/7292343
-g4 client --set_option multichange
-# Use allwrite to simplify opening the correct files after rsync.
-g4 client --set_option allwrite
-# Filter directories added to CitC.
-rsync -avzJ \
- --delete \
- --delete-excluded \
- --include=/bench \
- --include=/dm \
- --include=/gm \
- --include=/include \
- --include=/resources \
- --exclude=/src/animator \
- --include=/src \
- --include=/tests \
- --include=/third_party \
- --include=/tools \
- --include=/.git \
- '--exclude=/*/' \
- --include=/third_party/etc1 \
- --include=/third_party/ktx \
- --include=/third_party/libwebp \
- '--exclude=/third_party/*/' \
- "${TMP}/skia/" \
- "./"
-
-# Open added/changed files for add/edit.
-g4 reopen
-# Revert files that are equivalent to the checked in version.
-g4 revert -a
-
-# Tell CitC to ignore .git and .gitignore.
-find . \
- \( -name .git \
- -o -name .gitignore \
- \) \
- -execdir g4 revert -k \{\} \;
-
-# Tell Git to ignore README.google and BUILD.
-echo README.google >> .git/info/exclude
-echo BUILD >> .git/info/exclude
-g4 revert README.google
-g4 revert BUILD
-
-# Use google3 version of OWNERS.
-find . \
- -name OWNERS \
- -exec git update-index --skip-worktree \{\} \; \
- -execdir g4 revert \{\} \;
-
-# Tell git to ignore these files that have Windows line endings, because Piper
-# will always change them to Unix line endings.
-git update-index --skip-worktree make.bat
-git update-index --skip-worktree make.py
-
-# Tell git to ignore files left out of the rsync (i.e. "deleted" files).
-git status --porcelain | \
- grep -e "^ D" | \
- cut -c 4- | \
- xargs git update-index --skip-worktree
-
diff --git a/tools/sync_google3.sh b/tools/sync_google3.sh
deleted file mode 100755
index 2a1cc4b874..0000000000
--- a/tools/sync_google3.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/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 latest 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)"
-SKIA_REV="$(git ls-remote https://skia.googlesource.com/skia refs/heads/master | cut -f 1)"
-
-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 "${SKIA_REV}"
-
-echo "Synced client ${CLIENT_NAME} to ${SKIA_REV}"
-
-# Grab previous Git revision.
-GOOGLE3_REV="$(grep "Version: " README.google | cut -d ' ' -f 2)"
-
-# Update README.google.
-sed --in-place "s/^Version: .*/Version: ${SKIA_REV}/" README.google
-sed --in-place "s/URL: https:\/\/skia.googlesource.com\/skia\/+archive\/.*\.tar\.gz/URL: https:\/\/skia.googlesource.com\/skia\/+archive\/${SKIA_REV}.tar.gz/" README.google
-
-# Add README.google to the default change.
-g4 reopen
-
-# Generate commit description.
-CURRENT_DATE=`date '+%d %B %Y'`
-COMMIT_RANGE="${GOOGLE3_REV:0:9}..${SKIA_REV:0:9}"
-CHANGES="$(git log ${COMMIT_RANGE} --date=short --no-merges --format='%ad %ae %s')"
-COMMITS="$(wc -l <<EOF
-${CHANGES}
-EOF
-)"
-DESC="$(cat <<EOF
-Roll Skia ${COMMIT_RANGE} (${COMMITS} commits)
-
-https://chromium.googlesource.com/skia.git/+log/${COMMIT_RANGE}
-
-$ git log ${COMMIT_RANGE} --date=short --no-merges --format='%ad %ae %s'
-${CHANGES}
-
-Change created by sync_google3.sh on ${CURRENT_DATE} by ${USER}
-EOF
-)"
-
-# Create a new CL.
-CHANGE="$(g4 change --desc "${DESC}.")"
-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