aboutsummaryrefslogtreecommitdiffhomepage
path: root/protoc-artifacts/build-protoc.sh
diff options
context:
space:
mode:
authorGravatar Kun Zhang <zhangkun@google.com>2015-04-06 14:31:29 -0700
committerGravatar Kun Zhang <zhangkun@google.com>2015-04-06 17:36:33 -0700
commitc5a2a7c3dba6a90a52689277d5a4eb08a5a383d2 (patch)
treec42f93a67d7acfe9147853acba37a7fa102e2ddf /protoc-artifacts/build-protoc.sh
parent4990875f0038da891badcecdd0d974de85ef043b (diff)
Process to deploy artifacts for multiple platforms into a single
release. - Do not close the staging repository automatically - Added staging.repository property - Updated README with instructions for deployment - Fix building 32-bit Mac artifact
Diffstat (limited to 'protoc-artifacts/build-protoc.sh')
-rwxr-xr-xprotoc-artifacts/build-protoc.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/protoc-artifacts/build-protoc.sh b/protoc-artifacts/build-protoc.sh
index 50c4b349..714b1bec 100755
--- a/protoc-artifacts/build-protoc.sh
+++ b/protoc-artifacts/build-protoc.sh
@@ -71,7 +71,13 @@ checkArch ()
fi
elif [[ "$OS" == osx ]]; then
format="$(file -b "$1" | grep -o "[^ ]*$")"
- assertEq $format "x86_64" $LINENO
+ if [[ "$ARCH" == x86_32 ]]; then
+ assertEq $format "i386" $LINENO
+ elif [[ "$ARCH" == x86_64 ]]; then
+ assertEq $format "x86_64" $LINENO
+ else
+ fail "Unsupported arch: $ARCH"
+ fi
else
fail "Unsupported system: $(uname)"
fi
@@ -120,6 +126,13 @@ elif [[ "$(uname)" == Linux* ]]; then
fi
elif [[ "$(uname)" == Darwin* ]]; then
assertEq "$OS" osx $LINENO
+ if [[ "$ARCH" == x86_64 ]]; then
+ CXXFLAGS="$CXXFLAGS -m64"
+ elif [[ "$ARCH" == x86_32 ]]; then
+ CXXFLAGS="$CXXFLAGS -m32"
+ else
+ fail "Unsupported arch: $ARCH"
+ fi
else
fail "Unsupported system: $(uname)"
fi