mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Most of the work to prepare for this change was done through the excellent work of @hwillson in meteor/meteor#9173 which, after some re-working to support the 64-bit architecture on Windows platforms, landed in meteor/meteor#9218, making this change as simple as bumping the minor version number (and rebuilding the dev bundle). From this point forward, and due to Mongo's discontinuation of 32-bit support in newer versions of MongoDB, 64-bit platforms will, in development, use newer versions of Mongo while 32-bit architectures will remain at 3.2.x versions. Of course, in production, apps are free to use whichever version of Mongo they would like, provided that version is supported by the Node Mongo driver and Meteor's Mongo data packages. At this time there is no target for when Meteor will stop supporting Mongo 3.2, but developers are encouraged to take steps to upgrade their Mongo deployments (through their database providers) to newer versions since Mongo has set September 2018 as the "End-of-Life" for Mongo 3.2.x. For more information on Mongo support cycles, see their support documents at https://www.mongodb.com/support-policy. Refs: https://github.com/meteor/meteor/pull/9173 Refs: https://github.com/meteor/meteor/pull/9218
90 lines
2.1 KiB
Bash
90 lines
2.1 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
|
|
UNAME=$(uname)
|
|
ARCH=$(uname -m)
|
|
NODE_VERSION=8.8.1
|
|
MONGO_VERSION_64BIT=3.4.10
|
|
MONGO_VERSION_32BIT=3.2.15
|
|
NPM_VERSION=5.4.2
|
|
|
|
# If we built Node from source on Jenkins, this is the build number.
|
|
NODE_BUILD_NUMBER=111
|
|
|
|
if [ "$UNAME" == "Linux" ] ; then
|
|
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
|
|
echo "Unsupported architecture: $ARCH"
|
|
echo "Meteor only supports i686 and x86_64 for now."
|
|
exit 1
|
|
fi
|
|
|
|
OS="linux"
|
|
|
|
stripBinary() {
|
|
strip --remove-section=.comment --remove-section=.note $1
|
|
}
|
|
elif [ "$UNAME" == "Darwin" ] ; then
|
|
SYSCTL_64BIT=$(sysctl -n hw.cpu64bit_capable 2>/dev/null || echo 0)
|
|
if [ "$ARCH" == "i386" -a "1" != "$SYSCTL_64BIT" ] ; then
|
|
# some older macos returns i386 but can run 64 bit binaries.
|
|
# Probably should distribute binaries built on these machines,
|
|
# but it should be OK for users to run.
|
|
ARCH="x86_64"
|
|
fi
|
|
|
|
if [ "$ARCH" != "x86_64" ] ; then
|
|
echo "Unsupported architecture: $ARCH"
|
|
echo "Meteor only supports x86_64 for now."
|
|
exit 1
|
|
fi
|
|
|
|
OS="osx"
|
|
|
|
# We don't strip on Mac because we don't know a safe command. (Can't strip
|
|
# too much because we do need node to be able to load objects like
|
|
# fibers.node.)
|
|
stripBinary() {
|
|
true
|
|
}
|
|
else
|
|
echo "This OS not yet supported"
|
|
exit 1
|
|
fi
|
|
|
|
PLATFORM="${UNAME}_${ARCH}"
|
|
|
|
if [ "$UNAME" == "Linux" ]
|
|
then
|
|
if [ "$ARCH" == "i686" ]
|
|
then
|
|
NODE_TGZ="node-v${NODE_VERSION}-linux-x86.tar.gz"
|
|
elif [ "$ARCH" == "x86_64" ]
|
|
then
|
|
NODE_TGZ="node-v${NODE_VERSION}-linux-x64.tar.gz"
|
|
else
|
|
echo "Unknown architecture: $UNAME $ARCH"
|
|
exit 1
|
|
fi
|
|
elif [ "$UNAME" == "Darwin" ]
|
|
then
|
|
NODE_TGZ="node-v${NODE_VERSION}-darwin-x64.tar.gz"
|
|
else
|
|
echo "Unknown architecture: $UNAME $ARCH"
|
|
exit 1
|
|
fi
|
|
|
|
SCRIPTS_DIR=$(dirname $0)
|
|
cd "$SCRIPTS_DIR/.."
|
|
CHECKOUT_DIR=$(pwd)
|
|
|
|
DIR=$(mktemp -d -t generate-dev-bundle-XXXXXXXX)
|
|
trap 'rm -rf "$DIR" >/dev/null 2>&1' 0
|
|
|
|
cd "$DIR"
|
|
chmod 755 .
|
|
umask 022
|
|
mkdir build
|
|
cd build
|