| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # This script copies all dependencies required for trace collection. | 6 # This script copies all dependencies required for trace collection. |
| 7 # Usage: | 7 # Usage: |
| 8 # deploy.sh builddir gcs_path | 8 # deploy.sh builddir gcs_path |
| 9 # | 9 # |
| 10 # Where: | 10 # Where: |
| 11 # builddir is the build directory for Chrome | 11 # builddir is the build directory for Chrome |
| 12 # gcs_path is the Google Storage bucket under which the deployment is | 12 # gcs_path is the Google Storage bucket under which the deployment is |
| 13 # installed | 13 # installed |
| 14 | 14 |
| 15 builddir=$1 | 15 builddir=$1 |
| 16 tmpdir=`mktemp -d` | 16 tmpdir=`mktemp -d` |
| 17 deployment_gcs_path=$2/deployment | 17 deployment_gcs_path=$2/deployment |
| 18 | 18 |
| 19 # Extract needed sources. | 19 # Extract needed sources. |
| 20 src_suffix=src | 20 src_suffix=src |
| 21 tmp_src_dir=$tmpdir/$src_suffix | 21 tmp_src_dir=$tmpdir/$src_suffix |
| 22 | 22 |
| 23 # Copy files from tools/android/loading. | 23 # Copy files from tools/android/loading. |
| 24 mkdir -p $tmp_src_dir/tools/android/loading | 24 mkdir -p $tmp_src_dir/tools/android/loading/frontend |
| 25 cp tools/android/loading/*.py $tmp_src_dir/tools/android/loading | 25 cp tools/android/loading/*.py $tmp_src_dir/tools/android/loading |
| 26 cp tools/android/loading/frontend/*.py \ |
| 27 $tmp_src_dir/tools/android/loading/frontend/ |
| 26 cp -r tools/android/loading/gce $tmp_src_dir/tools/android/loading | 28 cp -r tools/android/loading/gce $tmp_src_dir/tools/android/loading |
| 27 | 29 |
| 28 # Copy other dependencies. | 30 # Copy other dependencies. |
| 29 mkdir $tmp_src_dir/third_party | 31 mkdir $tmp_src_dir/third_party |
| 30 rsync -av --exclude=".*" --exclude "*.pyc" --exclude "*.html" --exclude "*.md" \ | 32 rsync -av --exclude=".*" --exclude "*.pyc" --exclude "*.html" --exclude "*.md" \ |
| 31 third_party/catapult $tmp_src_dir/third_party | 33 third_party/catapult $tmp_src_dir/third_party |
| 32 mkdir $tmp_src_dir/tools/perf | 34 mkdir $tmp_src_dir/tools/perf |
| 33 cp -r tools/perf/chrome_telemetry_build $tmp_src_dir/tools/perf | 35 cp -r tools/perf/chrome_telemetry_build $tmp_src_dir/tools/perf |
| 34 mkdir -p $tmp_src_dir/build/android | 36 mkdir -p $tmp_src_dir/build/android |
| 35 cp build/android/devil_chromium.py $tmp_src_dir/build/android/ | 37 cp build/android/devil_chromium.py $tmp_src_dir/build/android/ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 # Generate and upload metadata about this deployment. | 56 # Generate and upload metadata about this deployment. |
| 55 CHROMIUM_REV=$(git merge-base HEAD origin/master) | 57 CHROMIUM_REV=$(git merge-base HEAD origin/master) |
| 56 cat >$tmpdir/build_metadata.json << EOF | 58 cat >$tmpdir/build_metadata.json << EOF |
| 57 { | 59 { |
| 58 "chromium_rev": "$CHROMIUM_REV" | 60 "chromium_rev": "$CHROMIUM_REV" |
| 59 } | 61 } |
| 60 EOF | 62 EOF |
| 61 gsutil cp $tmpdir/build_metadata.json \ | 63 gsutil cp $tmpdir/build_metadata.json \ |
| 62 gs://$deployment_gcs_path/deployment_metadata.json | 64 gs://$deployment_gcs_path/deployment_metadata.json |
| 63 rm -rf $tmpdir | 65 rm -rf $tmpdir |
| OLD | NEW |