Skip to content

Commit

Permalink
Merge pull request #10607 from deannagarcia/buildZip20
Browse files Browse the repository at this point in the history
Use local protoc artifacts
  • Loading branch information
deannagarcia authored Sep 16, 2022
2 parents ca680ef + 661b490 commit 139068b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions protoc-artifacts/build-zip.sh
Original file line number Diff line number Diff line change
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

0 comments on commit 139068b

Please sign in to comment.