mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 16:02:28 +00:00
scripts/genproto.sh: Support OSX sed
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
6005ac6f9d
commit
e43a1d546a
@ -43,11 +43,11 @@ for dir in ${DIRS}; do
|
|||||||
protoc --gogofast_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,paths=source_relative:. -I=. \
|
protoc --gogofast_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,paths=source_relative:. -I=. \
|
||||||
-I="${GOGOPROTO_PATH}" \
|
-I="${GOGOPROTO_PATH}" \
|
||||||
./io/prometheus/client/*.proto
|
./io/prometheus/client/*.proto
|
||||||
sed -i.bak -E 's/import _ \"github.com\/gogo\/protobuf\/gogoproto\"//g' -- *.pb.go
|
sed -i.bak -E 's/import _ \"github.com\/gogo\/protobuf\/gogoproto\"//g' *.pb.go
|
||||||
sed -i.bak -E 's/import _ \"google\/protobuf\"//g' -- *.pb.go
|
sed -i.bak -E 's/import _ \"google\/protobuf\"//g' *.pb.go
|
||||||
sed -i.bak -E 's/\t_ \"google\/protobuf\"//g' -- *.pb.go
|
sed -i.bak -E 's/\t_ \"google\/protobuf\"//g' *.pb.go
|
||||||
sed -i.bak -E 's/golang\/protobuf\/descriptor/gogo\/protobuf\/protoc-gen-gogo\/descriptor/g' -- *.go
|
sed -i.bak -E 's/golang\/protobuf\/descriptor/gogo\/protobuf\/protoc-gen-gogo\/descriptor/g' *.go
|
||||||
sed -i.bak -E 's/golang\/protobuf/gogo\/protobuf/g' -- *.go
|
sed -i.bak -E 's/golang\/protobuf/gogo\/protobuf/g' *.go
|
||||||
rm -f -- *.bak
|
rm -f -- *.bak
|
||||||
goimports -w ./*.go ./io/prometheus/client/*.go
|
goimports -w ./*.go ./io/prometheus/client/*.go
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user