mirror of
https://github.com/meteor/meteor.git
synced 2026-01-10 08:08:24 -05:00
Download prebuilt Node binaries from npmjs.org instead of s3.
This commit is contained in:
@@ -5,6 +5,7 @@ set -u
|
||||
|
||||
UNAME=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
NODE_VERSION=0.10.43
|
||||
|
||||
if [ "$UNAME" == "Linux" ] ; then
|
||||
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
|
||||
@@ -48,6 +49,26 @@ 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)
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# When upgrading node versions, also update the values of MIN_NODE_VERSION at
|
||||
# the top of tools/main.js and tools/server/boot.js, and the text in
|
||||
# docs/client/full-api/concepts.html and the README in tools/bundler.js.
|
||||
NODE_VERSION=0.10.43
|
||||
|
||||
source "$(dirname $0)/build-dev-bundle-common.sh"
|
||||
echo CHECKOUT DIR IS "$CHECKOUT_DIR"
|
||||
echo BUILDING NODE "v$NODE_VERSION" IN "$DIR"
|
||||
|
||||
# For now, use our fork with https://github.com/npm/npm/pull/5821
|
||||
git clone --branch "v${NODE_VERSION}-with-npm-5821" --depth 1 \
|
||||
https://github.com/meteor/node.git
|
||||
cd node
|
||||
rm -rf .git
|
||||
./configure --prefix="$DIR"
|
||||
make -j4
|
||||
make install PORTABLE=1
|
||||
# PORTABLE=1 is a node hack to make npm look relative to itself instead
|
||||
# of hard coding the PREFIX.
|
||||
|
||||
cd "$DIR"
|
||||
stripBinary bin/node
|
||||
|
||||
# export path so we use our new node for later builds
|
||||
PATH="$DIR/bin:$PATH"
|
||||
which node
|
||||
which npm
|
||||
|
||||
echo BUNDLING
|
||||
|
||||
cd "$DIR"
|
||||
rm -rf build
|
||||
tar czvf "${CHECKOUT_DIR}/node_${PLATFORM}_v${NODE_VERSION}.tar.gz" .
|
||||
|
||||
echo DONE
|
||||
@@ -20,16 +20,9 @@ S3_HOST="s3.amazonaws.com/com.meteor.jenkins"
|
||||
|
||||
# Update these values after building the dev-bundle-node Jenkins project.
|
||||
# Also make sure to update NODE_VERSION in generate-dev-bundle.ps1.
|
||||
NODE_VERSION=0.10.43
|
||||
NODE_BUILD_NUMBER=22
|
||||
NODE_TGZ="node_${PLATFORM}_v${NODE_VERSION}.tar.gz"
|
||||
if [ -f "${CHECKOUT_DIR}/${NODE_TGZ}" ] ; then
|
||||
tar zxf "${CHECKOUT_DIR}/${NODE_TGZ}"
|
||||
else
|
||||
NODE_URL="https://${S3_HOST}/dev-bundle-node-${NODE_BUILD_NUMBER}/${NODE_TGZ}"
|
||||
echo "Downloading Node from ${NODE_URL}"
|
||||
curl "${NODE_URL}" | tar zx
|
||||
fi
|
||||
NODE_URL="https://nodejs.org/dist/v${NODE_VERSION}/${NODE_TGZ}"
|
||||
echo "Downloading Node from ${NODE_URL}"
|
||||
curl "${NODE_URL}" | tar zx --strip-components 1
|
||||
|
||||
# Update these values after building the dev-bundle-mongo Jenkins project.
|
||||
# Also make sure to update MONGO_VERSION in generate-dev-bundle.ps1.
|
||||
@@ -80,6 +73,7 @@ mkdir -p "${DIR}/server-lib/node_modules"
|
||||
# This ignores the stuff in node_modules/.bin, but that's OK.
|
||||
cp -R node_modules/* "${DIR}/server-lib/node_modules/"
|
||||
|
||||
mkdir -p "${DIR}/etc"
|
||||
mv package.json npm-shrinkwrap.json "${DIR}/etc/"
|
||||
|
||||
# Fibers ships with compiled versions of its C code for a dozen platforms. This
|
||||
@@ -160,7 +154,7 @@ echo BUNDLING
|
||||
|
||||
cd "$DIR"
|
||||
echo "${BUNDLE_VERSION}" > .bundle_version.txt
|
||||
rm -rf build
|
||||
rm -rf build CHANGELOG.md ChangeLog LICENSE README.md
|
||||
|
||||
tar czf "${CHECKOUT_DIR}/dev_bundle_${PLATFORM}_${BUNDLE_VERSION}.tar.gz" .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user