Skip to content

Commit

Permalink
Change base protobuf version to 3.21.2 and provide a JS plugin (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
kosak authored Dec 18, 2023
1 parent 6dcf38e commit 0f2c39f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion proto/01-protoc-base/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
44a6b498e996b845edef83864734c0e52f42197e85c9d567af55f4e3ff09d755 protoc-3.20.3-linux-x86_64.zip
997dfc13189bd0af1051cbc026a095a520e171fbeb0e7460f959ae236b00aa2e protoc-21.2-linux-x86_64.zip
cf659ab2367a47590651deb3beb8d6ea177cbd7ff2124ea0d12de06d3181f5c5 protoc-gen-grpc-java-1.50.2-linux-x86_64.exe
075ed6163fea314c415f67a4af68d1b6dbddc8fa8be35addf74e4c81812a9148 protobuf-javascript-3.21.2-linux-x86_64.zip
14 changes: 9 additions & 5 deletions proto/01-protoc-base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,24 @@ python3 -m pip install -q --no-cache-dir --upgrade setuptools
python3 -m pip install -q --no-cache-dir -r "${__dir}/requirements.txt"
python3 -m pip list

# Note: should not update past 3.20.x until https://github.com/protocolbuffers/protobuf-javascript/issues/127 is fixed

wget -q "https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-x86_64.zip"
wget -q "https://github.com/protocolbuffers/protobuf/releases/download/v21.2/protoc-21.2-linux-x86_64.zip"
wget -q "https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.50.2/protoc-gen-grpc-java-1.50.2-linux-x86_64.exe"
wget -q "https://github.com/protocolbuffers/protobuf-javascript/releases/download/v3.21.2/protobuf-javascript-3.21.2-linux-x86_64.zip"
sha256sum --check "${__dir}/checksums.txt"

unzip protoc-3.20.3-linux-x86_64.zip -d /opt/protoc
rm protoc-3.20.3-linux-x86_64.zip
unzip protoc-21.2-linux-x86_64.zip -d /opt/protoc
rm protoc-21.2-linux-x86_64.zip

mkdir -p /opt/java/bin

mv protoc-gen-grpc-java-1.50.2-linux-x86_64.exe /opt/java/bin/protoc-gen-grpc-java
chmod +x /opt/java/bin/protoc-gen-grpc-java

unzip protobuf-javascript-3.21.2-linux-x86_64.zip -d jsplugin_temp
# move somewhere that is guaranteed to be on the PATH so protoc can find it
mv jsplugin_temp/bin/protoc-gen-js /usr/local/bin/
rm -r protobuf-javascript-3.21.2-linux-x86_64.zip jsplugin_temp

mkdir -p /usr/src/app
cp "${__dir}/package.json" /usr/src/app
cp "${__dir}/package-lock.json" /usr/src/app
Expand Down
6 changes: 3 additions & 3 deletions proto/01-protoc-base/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/01-protoc-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"google-protobuf": "~3.20.1",
"google-protobuf": "~3.21.2",
"ts-protoc-gen": "^0.15.0"
},
"engines": {
Expand Down

0 comments on commit 0f2c39f

Please sign in to comment.