From 0661cc41dc65545938515f7e3944e1b4ea4618e5 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Fri, 16 Sep 2022 20:13:17 +0000 Subject: [PATCH] Use local artifacts --- protoc-artifacts/build-zip.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/protoc-artifacts/build-zip.sh b/protoc-artifacts/build-zip.sh index 7d1923e6e608..d9979c4bcf21 100755 --- a/protoc-artifacts/build-zip.sh +++ b/protoc-artifacts/build-zip.sh @@ -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/--win32.zip dist/--win64.zip dist/--osx-x86_64.zip @@ -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