diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2016-07-29 11:44:05 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2016-07-29 11:44:05 -0700 |
commit | 6a59ac94e1f6c2ae65b516e0c4928b68db3f335d (patch) | |
tree | e2e5774f7117155e6b00d9e47fcefa53cbf88c3a | |
parent | de30c5639165f69db0cdfe538d82d13250c274bb (diff) | |
download | protobuf-6a59ac94e1f6c2ae65b516e0c4928b68db3f335d.tar.gz protobuf-6a59ac94e1f6c2ae65b516e0c4928b68db3f335d.tar.bz2 protobuf-6a59ac94e1f6c2ae65b516e0c4928b68db3f335d.zip |
Fix the build-zip.sh to add .exe for win packages.
-rwxr-xr-x | protoc-artifacts/build-zip.sh | 10 |
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 |