Skip to content

Commit 805210e

Browse files
committed
Use protoc 30.2 in bump_bbs_protos action
1 parent f624486 commit 805210e

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/bump_bbs_protos.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,22 @@ jobs:
2626

2727
- name: Install protoc
2828
run: |
29-
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
30-
sudo unzip -q /tmp/protoc.zip -d /usr/local
29+
wget -q -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protoc-30.2-linux-x86_64.zip
30+
unzip -q /tmp/protoc.zip -d /tmp/protoc
3131
rm /tmp/protoc.zip
32-
wget -q -O /tmp/protobuf.zip https://github.com/protocolbuffers/protobuf/archive/v3.6.1.zip
33-
unzip -q /tmp/protobuf.zip -d /tmp
34-
sudo cp -r /tmp/protobuf-3.6.1/src/google /usr/local/include/
32+
33+
sudo mv /tmp/protoc/bin/protoc /usr/local/bin/protoc
34+
sudo cp -r /tmp/protoc/include/google /usr/local/include/
3535
sudo chmod -R 755 /usr/local/include/google
36-
rm -rf /tmp/protobuf.zip /tmp/protobuf-3.6.1
36+
rm -rf /tmp/protoc
3737
export PATH=$PATH:/usr/local/bin
3838
39-
- name: Clone gogo/protobuf
40-
run: |
41-
PROTO_SRC=$(mktemp -d)
42-
git clone https://github.com/gogo/protobuf.git "$PROTO_SRC/github.com/gogo/protobuf"
43-
echo "PROTO_SRC=$PROTO_SRC" >> $GITHUB_ENV
44-
4539
- name: Generate Ruby files from protos
4640
run: |
4741
RUBY_OUT=$(mktemp -d)
4842
pushd bbs > /dev/null
49-
sed -i'' -e 's/package models/package diego.bbs.models/' models/*.proto
50-
protoc --proto_path="$PROTO_SRC":models --ruby_out="$RUBY_OUT" models/*.proto
43+
sed -i'' -E '/import.*gogoproto/d; /option.*gogoproto/d; s/\(gogoproto.*, //g; s/, \(gogoproto[^]]+//g; s/\[\(gogoproto[^]]*\]//g; s/package models/package diego.bbs.models/' models/*.proto
44+
protoc --proto_path=models --ruby_out="$RUBY_OUT" models/*.proto
5145
popd > /dev/null
5246
cp -r "$RUBY_OUT/." cloud_controller_ng/lib/diego/bbs/models
5347

0 commit comments

Comments
 (0)