Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local protoc artifacts #10606

Merged
merged 1 commit into from Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 5 additions & 10 deletions protoc-artifacts/build-zip.sh
Expand Up @@ -10,10 +10,10 @@ Example:
$ $0 protoc 3.0.0
$ $0 protoc-gen-javalite 3.0.0

This script will download pre-built protoc or protoc plugin binaries from maven
repository and create .zip packages suitable to be included in the github
release page. If the target is protoc, well-known type .proto files will also be
included. Each invocation will create 8 zip packages:
This script will create .zip packages suitable to be included in the github
release page. It requires all protoc executables to be present in the
protoc-artifacts/ directory. If the target is protoc, well-known type .proto
files will also be included. Each invocation will create 8 zip packages:
dist/<TARGET>-<VERSION_NUMBER>-win32.zip
dist/<TARGET>-<VERSION_NUMBER>-win64.zip
dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip
Expand Down Expand Up @@ -98,12 +98,7 @@ for((i=0;i<${#FILE_NAMES[@]};i+=2));do
BINARY="$TARGET"
fi
BINARY_NAME=${FILE_NAMES[$(($i+1))]}
BINARY_URL=https://repo1.maven.org/maven2/com/google/protobuf/$TARGET/${VERSION_NUMBER}/$TARGET-${VERSION_NUMBER}-${BINARY_NAME}
if ! wget ${BINARY_URL} -O ${DIR}/bin/$BINARY &> /dev/null; then
echo "[ERROR] Failed to download ${BINARY_URL}" >&2
echo "[ERROR] Skipped $TARGET-${VERSION_NAME}-${ZIP_NAME}" >&2
continue
fi
cp $BINARY_NAME ${DIR}/bin/$BINARY
TARGET_ZIP_FILE=`pwd`/dist/$TARGET-${VERSION_NUMBER}-${ZIP_NAME}
pushd $DIR &> /dev/null
chmod +x bin/$BINARY
Expand Down