aboutsummaryrefslogtreecommitdiff
path: root/third_party/fuchsia/copy.bara.sky
blob: 7d51519e8c7d5c12fa072022b6e8e292a7598577 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 2022 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

fuchsia_repo_files = [
    ".clang-format",
    # fit
    "sdk/lib/fit/include/lib/fit/function.h",
    "sdk/lib/fit/include/lib/fit/internal/compiler.h",
    "sdk/lib/fit/include/lib/fit/internal/function.h",
    "sdk/lib/fit/include/lib/fit/internal/result.h",
    "sdk/lib/fit/include/lib/fit/internal/utility.h",
    "sdk/lib/fit/include/lib/fit/nullable.h",
    "sdk/lib/fit/include/lib/fit/result.h",
    "sdk/lib/fit/include/lib/fit/traits.h",
    "sdk/lib/fit/test/function_tests.cc",
    # stdcompat
    "sdk/lib/stdcompat/include/lib/stdcompat/bit.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/functional.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/memory.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/optional.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/type_traits.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/utility.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/version.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/bit.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/constructors.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/exception.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/storage.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h",
    "sdk/lib/stdcompat/include/lib/stdcompat/internal/utility.h",
]

core.workflow(
    name = "default",
    description = "Imports files from Fuchsia's fit library",
    origin = git.origin(
        url = "https://fuchsia.googlesource.com/fuchsia",
        ref = "main",
    ),
    destination = git.gerrit_destination(
        url = "https://pigweed.googlesource.com/pigweed/pigweed",
        fetch = "main",
        push_to_refs_for = "main%message=No%2dDocs%2dUpdate%2dReason%3a_copybara_import",
        labels = ["Commit-Queue+1"],
        checker = leakr.disable_check("Syncing between OSS projects"),
    ),
    origin_files = glob(fuchsia_repo_files),
    destination_files = glob(["third_party/fuchsia/repo/**"]),
    authoring = authoring.pass_thru("Fuchsia Authors <noreply@google.com>"),
    transformations = [
        core.move("", "third_party/fuchsia/repo"),
        # Apply the patch file created by generate_fuchsia_patch.py.
        patch.apply(["pigweed_adaptations.patch"]),
        # Replace test #includes with gtest.
        core.replace("#include <zxtest/zxtest.h>", "#include \"gtest/gtest.h\""),
        # Show all commits but exclude the author to reduce line length.
        metadata.squash_notes(
            "third_party/fuchsia: Copybara import of the fit library\n\n",
            show_author = False,
        ),
    ],
)