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