Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: tools/sync_google3.sh

Issue 1291603003: Add files from google3 to Git repo. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Remove BUILD, add BUILD.public, and update sync script to replace BUILD.google with BUILD. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« BUILD.public ('K') | « tools/git_clone_to_google3.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sync_google3.sh
diff --git a/tools/sync_google3.sh b/tools/sync_google3.sh
new file mode 100755
index 0000000000000000000000000000000000000000..50ad61c4a63dd7cd3463dfcf5622dadf2e53e7a2
--- /dev/null
+++ b/tools/sync_google3.sh
@@ -0,0 +1,43 @@
+#!/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
+
+source gbash.sh || exit
+
+set -x -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}"
+
+# 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/")"
+
+# Run TAP.
+tap_presubmit -c "${CL}" -p skia
« BUILD.public ('K') | « tools/git_clone_to_google3.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698