From cc16c598d7f3411985378abe4bc94764eb1f8ec3 Mon Sep 17 00:00:00 2001 From: benjaminwagner Date: Mon, 11 Jan 2016 10:35:46 -0800 Subject: Remove Google3 scripts. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573223002 Review URL: https://codereview.chromium.org/1573223002 --- tools/create_skia_google3_client.sh | 27 ----------- tools/git_clone_to_google3.sh | 96 ------------------------------------- tools/sync_google3.sh | 75 ----------------------------- 3 files changed, 198 deletions(-) delete mode 100755 tools/create_skia_google3_client.sh delete mode 100755 tools/git_clone_to_google3.sh delete mode 100755 tools/sync_google3.sh 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 - -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 <&2 - exit 3 -fi -- cgit v1.2.3