aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2016-07-29 11:47:47 -0700
committerGitHub <noreply@github.com>2016-07-29 11:47:47 -0700
commit7e93458bb7417e0c0c7af11a4eae9950b55a320a (patch)
treee2e5774f7117155e6b00d9e47fcefa53cbf88c3a
parentde30c5639165f69db0cdfe538d82d13250c274bb (diff)
parent6a59ac94e1f6c2ae65b516e0c4928b68db3f335d (diff)
downloadprotobuf-7e93458bb7417e0c0c7af11a4eae9950b55a320a.tar.gz
protobuf-7e93458bb7417e0c0c7af11a4eae9950b55a320a.tar.bz2
protobuf-7e93458bb7417e0c0c7af11a4eae9950b55a320a.zip
Merge pull request #1888 from pherl/fixbuildzip
Fix the build-zip.sh to add .exe for win packages.
-rwxr-xr-xprotoc-artifacts/build-zip.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/protoc-artifacts/build-zip.sh b/protoc-artifacts/build-zip.sh
index d8686d3b..3c5e887b 100755
--- a/protoc-artifacts/build-zip.sh
+++ b/protoc-artifacts/build-zip.sh
@@ -82,21 +82,27 @@ mkdir -p ${DIR}/bin
# Create a zip file for each binary.
for((i=0;i<${#FILE_NAMES[@]};i+=2));do
ZIP_NAME=${FILE_NAMES[$i]}
+ if [ ${ZIP_NAME:0:3} = "win" ]; then
+ BINARY="$TARGET.exe"
+ else
+ BINARY="$TARGET"
+ fi
BINARY_NAME=${FILE_NAMES[$(($i+1))]}
BINARY_URL=http://repo1.maven.org/maven2/com/google/protobuf/$TARGET/${VERSION_NUMBER}/$TARGET-${VERSION_NUMBER}-${BINARY_NAME}
- if ! wget ${BINARY_URL} -O ${DIR}/bin/$TARGET &> /dev/null; then
+ 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
TARGET_ZIP_FILE=`pwd`/dist/$TARGET-${VERSION_NUMBER}-${ZIP_NAME}
pushd $DIR &> /dev/null
- chmod +x bin/$TARGET
+ chmod +x bin/$BINARY
if [ "$TARGET" = "protoc" ]; then
zip -r ${TARGET_ZIP_FILE} include bin readme.txt &> /dev/null
else
zip -r ${TARGET_ZIP_FILE} bin &> /dev/null
fi
+ rm bin/$BINARY
popd &> /dev/null
echo "[INFO] Successfully created ${TARGET_ZIP_FILE}"
done