macos does not have sed --in-place argument (#12330)

This commit is contained in:
sobolevn
2024-07-13 16:02:22 +03:00
committed by GitHub
parent 1eb6e223f4
commit c4f7a72e50
3 changed files with 5 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ rm -rf "$TMP_DIR"
# Must be in a git repository to run pre-commit
cd "$REPO_ROOT"
sed --in-place="" \
sed -i "" \
"s/extra_description = .*$/extra_description = \"\
Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \
and $PROTOC_VERSION \

View File

@@ -50,7 +50,7 @@ rm -rf "$TMP_DIR"
# Must be in a git repository to run pre-commit
cd "$REPO_ROOT"
sed --in-place="" \
sed -i "" \
"s/extra_description = .*$/extra_description = \"\
Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \
and $PROTOC_VERSION \

View File

@@ -63,9 +63,9 @@ cd "$REPO_ROOT"
# Move third-party and fix imports
mv stubs/tensorflow/tsl/ stubs/tensorflow/tensorflow/
find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed --in-place="" -r "s/(\[|\s)tsl\./\1tensorflow\.tsl\./"
find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed -i "" -r "s/(\[|\s)tsl\./\1tensorflow\.tsl\./"
mv stubs/tensorflow/xla/ stubs/tensorflow/tensorflow/compiler/
find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed --in-place="" -r "s/(\[|\s)xla\./\1tensorflow\.compiler\.xla\./"
find stubs/tensorflow/ -name '*_pb2.pyi' | xargs sed -i "" -r "s/(\[|\s)xla\./\1tensorflow\.compiler\.xla\./"
# These protos exist in a folder with protos used in python,
# but are not included in the python wheel.
@@ -89,7 +89,7 @@ rm -r \
stubs/tensorflow/tensorflow/core/protobuf/worker_service_pb2.pyi \
stubs/tensorflow/tensorflow/core/util/example_proto_fast_parsing_test_pb2.pyi \
sed --in-place="" \
sed -i "" \
"s/extra_description = .*$/extra_description = \"\
Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \
and $PROTOC_VERSION \