blob: 694a1aa0e9784b2037d9643c7d07627978586c24 [file] [log] [blame]
Hector Dearman21a33af2019-03-29 17:46:36 +00001#!/bin/bash
2
3set -e
4
5DIR=$(mktemp -d out/perfetto.XXXXXX)
6
7function cleanup {
8 rm -rf "$WORK_DIR"
9 echo "Deleted temp working directory $WORK_DIR"
10}
11
12#trap cleanup EXIT
13
14function is_mac {
15 ! test -d /proc
16 return $?
17}
18
19tools/gn gen $DIR --args='is_clang=true is_debug=false'
20tools/ninja -C $DIR trace_to_text
21hash=$(shasum $DIR/trace_to_text | cut -f1 -d' ')
22
23if is_mac; then
24 platform=mac
25else
26 platform=linux
27fi
28
29name=trace_to_text-$platform-$hash
30
31gsutil cp $DIR/trace_to_text gs://perfetto/$name
32gsutil cp $DIR/trace_to_text gs://chromium-telemetry/binary_dependencies/$name
33
34echo 'Now run the following command to update tools/traceconv:'
35echo "sed \"s/'$platform': '[^']*',/'$platform': '$hash',/\" --in-place tools/traceconv"
36