xref: /aosp_15_r20/external/pigweed/third_party/perfetto/copy.bara.sky (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Copyright 2024 The Pigweed Authors
2*61c4878aSAndroid Build Coastguard Worker#
3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of
5*61c4878aSAndroid Build Coastguard Worker# the License at
6*61c4878aSAndroid Build Coastguard Worker#
7*61c4878aSAndroid Build Coastguard Worker#     https://www.apache.org/licenses/LICENSE-2.0
8*61c4878aSAndroid Build Coastguard Worker#
9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under
13*61c4878aSAndroid Build Coastguard Worker# the License.
14*61c4878aSAndroid Build Coastguard Worker
15*61c4878aSAndroid Build Coastguard Workerperfetto_repo_files = [
16*61c4878aSAndroid Build Coastguard Worker    "LICENSE",
17*61c4878aSAndroid Build Coastguard Worker    "protos/perfetto/trace/perfetto_trace.proto",
18*61c4878aSAndroid Build Coastguard Worker]
19*61c4878aSAndroid Build Coastguard Worker
20*61c4878aSAndroid Build Coastguard Workercore.workflow(
21*61c4878aSAndroid Build Coastguard Worker    name = "default",
22*61c4878aSAndroid Build Coastguard Worker    description = "Imports files from the perfetto repo",
23*61c4878aSAndroid Build Coastguard Worker    origin = git.origin(
24*61c4878aSAndroid Build Coastguard Worker        url = "https://android.googlesource.com/platform/external/perfetto",
25*61c4878aSAndroid Build Coastguard Worker        ref = "main",
26*61c4878aSAndroid Build Coastguard Worker    ),
27*61c4878aSAndroid Build Coastguard Worker    destination = git.gerrit_destination(
28*61c4878aSAndroid Build Coastguard Worker        url = "https://pigweed.googlesource.com/pigweed/pigweed",
29*61c4878aSAndroid Build Coastguard Worker        fetch = "main",
30*61c4878aSAndroid Build Coastguard Worker        push_to_refs_for = "main%message=No%2dDocs%2dUpdate%2dReason%3a_copybara_import",
31*61c4878aSAndroid Build Coastguard Worker        labels = ["Commit-Queue+1"],
32*61c4878aSAndroid Build Coastguard Worker        checker = leakr.disable_check("Syncing between OSS projects"),
33*61c4878aSAndroid Build Coastguard Worker    ),
34*61c4878aSAndroid Build Coastguard Worker    origin_files = glob(perfetto_repo_files),
35*61c4878aSAndroid Build Coastguard Worker    # Exclude BUILD.gn files to keep Pigweed's versions.
36*61c4878aSAndroid Build Coastguard Worker    destination_files = glob(["third_party/perfetto/repo/**"], exclude = ["**/BUILD.gn"]),
37*61c4878aSAndroid Build Coastguard Worker    authoring = authoring.pass_thru("Fuchsia Authors <[email protected]>"),
38*61c4878aSAndroid Build Coastguard Worker    transformations = [
39*61c4878aSAndroid Build Coastguard Worker        core.move("", "third_party/perfetto/repo"),
40*61c4878aSAndroid Build Coastguard Worker        # Show all commits but exclude the author to reduce line length.
41*61c4878aSAndroid Build Coastguard Worker        metadata.squash_notes(
42*61c4878aSAndroid Build Coastguard Worker            "third_party/perfetto: Copybara import\n\n",
43*61c4878aSAndroid Build Coastguard Worker            show_author = False,
44*61c4878aSAndroid Build Coastguard Worker        ),
45*61c4878aSAndroid Build Coastguard Worker    ],
46*61c4878aSAndroid Build Coastguard Worker)
47