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

Side by Side Diff: tools/sync_google3.sh

Issue 1295213002: Revert of Fix a few bugs in the google3 sync scripts. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « tools/git_clone_to_google3.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright 2014 Google Inc. 2 # Copyright 2014 Google Inc.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Syncs //depot/google3/third_party/skia/HEAD to the last known good revision of 7 # Syncs //depot/google3/third_party/skia/HEAD to the last known good revision of
8 # Skia. If this script is not run from a Piper client, creates a new CitC 8 # Skia. If this script is not run from a Piper client, creates a new CitC
9 # client. Also updates README.google. 9 # client. Also updates README.google.
10 # 10 #
11 # Usage: 11 # Usage:
12 # ./tools/sync_google3.sh 12 # ./tools/sync_google3.sh
13 13
14 source gbash.sh || exit 14 source gbash.sh || exit
15 15
16 set -x -e 16 set -x -e
17 17
18 MY_DIR="$(gbash::get_absolute_caller_dir)" 18 MY_DIR="$(gbash::get_absolute_caller_dir)"
19 LKGR="$(${MY_DIR}/get_skia_lkgr.sh)" 19 LKGR="$(${MY_DIR}/get_skia_lkgr.sh)"
20 20
21 gbash::get_google3_dir && GOOGLE3="$(gbash::get_google3_dir)" 21 gbash::get_google3_dir && GOOGLE3="$(gbash::get_google3_dir)"
22 if [ -z "${GOOGLE3}" ]; then 22 if [ -z "${GOOGLE3}" ]; then
23 CLIENT_NAME="sync_skia_$(date '+%F-%H-%M-%S')" 23 CLIENT_NAME="sync_skia_$(date '+%F-%H-%M-%S')"
24 ${MY_DIR}/create_skia_google3_client.sh "${CLIENT_NAME}" 24 ${MY_DIR}/create_skia_google3_client.sh "${CLIENT_NAME}"
25 GOOGLE3="/google/src/cloud/${USER}/${CLIENT_NAME}/google3" 25 GOOGLE3="/google/src/cloud/${USER}/${CLIENT_NAME}/google3"
26 fi 26 fi
27 cd "${GOOGLE3}/third_party/skia/HEAD" 27 cd "${GOOGLE3}/third_party/skia/HEAD"
28 ${MY_DIR}/git_clone_to_google3.sh --skia_rev "${LKGR}" 28 ${MY_DIR}/git_clone_to_google3.sh --skia-rev "${LKGR}"
29 29
30 # Update README.google. 30 # Update README.google.
31 sed --in-place "s/^Version: .*/Version: ${LKGR}/" README.google 31 sed --in-place "s/^Version: .*/Version: ${LKGR}/" README.google
32 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 32 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
33 CURRENT_DATE=`date '+%d %B %Y'` 33 CURRENT_DATE=`date '+%d %B %Y'`
34 echo "Updated using sync_google3.sh on $CURRENT_DATE by $USER@google.com" >> REA DME.google 34 echo "Updated using sync_google3.sh on $CURRENT_DATE by $USER@google.com" >> REA DME.google
35 35
36 # Add README.google to the default change. 36 # Add README.google to the default change.
37 g4 reopen 37 g4 reopen
38 # Create a new CL. 38 # Create a new CL.
39 CHANGE="$(g4 change --desc "Update skia HEAD to ${LKGR}.")" 39 CHANGE="$(g4 change --desc "Update skia HEAD to ${LKGR}.")"
40 CL="$(echo "${CHANGE}" | sed "s/Change \([0-9]\+\) created.*/\1/")" 40 CL="$(echo "${CHANGE}" | sed "s/Change \([0-9]\+\) created.*/\1/")"
41 41
42 # Run TAP. 42 # Run TAP.
43 tap_presubmit -c "${CL}" -p skia 43 tap_presubmit -c "${CL}" -p skia
OLDNEW
« no previous file with comments | « tools/git_clone_to_google3.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698