[py] Add copybara scripts (#8368)

These are the scripts I've been using to sync between mostrobotpy and
here. I debated putting it in the "source of truth" that is
`mostrobotpy` , but I think it makes more sense here since it already
has bazel set up, and I've also recently added the ability to sync the
`commands-v2` repository, so having it all in one copybara script makes
sense.

This includes a helper python script to make it a little bit easier to
run.
This commit is contained in:
PJ Reiniger
2025-12-12 23:06:19 -05:00
committed by GitHub
parent 13abb3d332
commit 0049c6f23f
6 changed files with 557 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
load("@rules_java//java:java_binary.bzl", "java_binary")
load("@rules_pkg//:mappings.bzl", "pkg_files")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("//shared/bazel/rules:publishing.bzl", "publish_all")
@@ -41,6 +42,12 @@ alias(
visibility = ["//visibility:public"],
)
java_binary(
name = "copybara",
main_class = "com.google.copybara.Main",
runtime_deps = ["@com_github_google_copybara//jar"],
)
# This is a helper to run all of the pregeneration scripts at once.
write_source_files(
name = "write_pregenerated_files",