Skip to content

Commit

Permalink
Use local artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
deannagarcia committed Sep 16, 2022
1 parent 9e8d5f1 commit 0661cc4
Showing 1 changed file with 5 additions and 10 deletions.
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

0 comments on commit 0661cc4

Please sign in to comment.