diff --git a/README.md b/README.md index a04c60c7..5206dcfd 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ We currently sync automatically the following modules: | grpc-ecosystem/grpc-gateway | https://github.com/grpc-ecosystem/grpc-gateway | | | opencensus/opencensus | https://github.com/census-instrumentation/opencensus-proto | | | opentelemetry/opentelemetry | https://github.com/open-telemetry/opentelemetry-proto | | +| planetscale/vitess | https://github.com/planetscale/vitess-types | | | prometheus/client-model | https://github.com/prometheus/client_model | | | protocolbuffers/wellknowntypes | https://github.com/protocolbuffers/protobuf | | diff --git a/modules/static/planetscale/vitess/buf.md b/modules/static/planetscale/vitess/buf.md new file mode 100644 index 00000000..7cfb0942 --- /dev/null +++ b/modules/static/planetscale/vitess/buf.md @@ -0,0 +1,13 @@ +**This is a third-party repository managed by Buf.** + +Updates to the [source repository](https://github.com/planetscale/vitess-types) are automatically +synced on a periodic basis, and each BSR commit is tagged with corresponding Git commits. + +To depend on a specific Git commit, you can use it as your reference in your dependencies: + +``` +deps: + - buf.build/planetscale/vitess: +``` + +For more information, see the [documentation](https://docs.buf.build/bsr/overview). diff --git a/modules/static/planetscale/vitess/buf.yaml b/modules/static/planetscale/vitess/buf.yaml new file mode 100644 index 00000000..6001942f --- /dev/null +++ b/modules/static/planetscale/vitess/buf.yaml @@ -0,0 +1,2 @@ +version: v1 +name: buf.build/planetscale/vitess diff --git a/modules/static/planetscale/vitess/initref b/modules/static/planetscale/vitess/initref new file mode 100644 index 00000000..037bba26 --- /dev/null +++ b/modules/static/planetscale/vitess/initref @@ -0,0 +1 @@ +770e14433716a816905f267650191319f7d0515b diff --git a/modules/static/planetscale/vitess/rsync.incl b/modules/static/planetscale/vitess/rsync.incl new file mode 100644 index 00000000..52c31e98 --- /dev/null +++ b/modules/static/planetscale/vitess/rsync.incl @@ -0,0 +1,4 @@ ++ LICENSE ++ *.proto ++ */ +- * diff --git a/scripts/fetch.sh b/scripts/fetch.sh index e0fd18ab..8850d2c7 100755 --- a/scripts/fetch.sh +++ b/scripts/fetch.sh @@ -31,8 +31,27 @@ process_ref() { cp "${module_root}/${git_owner}/${git_repo}/LICENSE" . fi - # Copy only curated subset of files from that repo into a tmp module dir. - rsync -amR --include-from="${module_static_path}/rsync.incl" . "${mod_tmp_path}" + # rsync flags: https://linux.die.net/man/1/rsync + rsync_args=( + # Archive mode is a shortcut to preserve files modification times, permissions, recursive + # folders, among others: https://serverfault.com/questions/141773/what-is-archive-mode-in-rsync + --archive + + # Prune empty directory chains from file-list + --prune-empty-dirs + + # Use relative path names + --relative + + # Copy symlinks as content, not as symlinks, it overrides the --links option embedded in + # --archive that copies symlinks as symlinks (eg LICENSE for planetscale/vitess) + --copy-links + + # Copy only curated subset of files from that repo into a tmp module dir using `rsync.incl` file + # on each module's static dir + --include-from="${module_static_path}/rsync.incl" + ) + rsync "${rsync_args[@]}" . "${mod_tmp_path}" [ ! -e "${module_static_path}/buf.md" ] || cp "${module_static_path}/buf.md" "${mod_tmp_path}" [ ! -e "${module_static_path}/buf.yaml" ] || cp "${module_static_path}/buf.yaml" "${mod_tmp_path}" @@ -192,6 +211,7 @@ sync_references commits grpc grpc https://github.com/grpc/grpc-proto sync_references commits grpc-ecosystem grpc-gateway https://github.com/grpc-ecosystem/grpc-gateway sync_references commits opencensus opencensus https://github.com/census-instrumentation/opencensus-proto src sync_references commits opentelemetry opentelemetry https://github.com/open-telemetry/opentelemetry-proto +sync_references commits planetscale vitess https://github.com/planetscale/vitess-types src sync_references commits prometheus client-model https://github.com/prometheus/client_model sync_references releases protocolbuffers wellknowntypes https://github.com/protocolbuffers/protobuf src