mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
build-engine-tarballs.sh
This commit is contained in:
committed by
David Glasser
parent
cb64708cae
commit
e76e76dd66
37
tools/admin/build-engine-tarballs.sh
Executable file
37
tools/admin/build-engine-tarballs.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# cd to top level dir
|
||||
cd `dirname $0`
|
||||
cd ../..
|
||||
TOPDIR=$(pwd)
|
||||
|
||||
UNAME=$(uname)
|
||||
ARCH=$(uname -m)
|
||||
|
||||
TMPDIR=$(mktemp -d -t meteor-build-release-XXXXXXXX)
|
||||
trap 'rm -rf "$TMPDIR" >/dev/null 2>&1' 0
|
||||
|
||||
# get the engine version.
|
||||
ENGINE_VERSION="$($TOPDIR/meteor --version | perl -ne 'print $1 if /Engine version (\S+)/')"
|
||||
echo "Creating tarballs for engine version $ENGINE_VERSION..."
|
||||
|
||||
mkdir -p "$TMPDIR/.meteor/engines"
|
||||
export TARGET_DIR="$TMPDIR/.meteor/engines/$ENGINE_VERSION"
|
||||
$TOPDIR/tools/admin/build-engine-tree.sh
|
||||
ln -s "$ENGINE_VERSION" "$TMPDIR/.meteor/engines/latest"
|
||||
ln -s engines/latest/bin/meteor "$TMPDIR/.meteor/meteor"
|
||||
|
||||
# tar it up
|
||||
OUTDIR="$TOPDIR/dist"
|
||||
rm -rf "$OUTDIR"
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
ENGINE_TARBALL="$OUTDIR/meteor-engine-${ENGINE_VERSION}-${UNAME}-${ARCH}.tar.gz"
|
||||
echo "Tarring engine to: $ENGINE_TARBALL"
|
||||
tar -C "$TMPDIR/.meteor/engines" --exclude .meteor/local -czf "$ENGINE_TARBALL" "$ENGINE_VERSION"
|
||||
|
||||
ENGINE_BOOTSTRAP_TARBALL="$OUTDIR/meteor-engine-bootstrap-${UNAME}-${ARCH}.tar.gz"
|
||||
echo "Tarring engine bootstrap to: $ENGINE_BOOTSTRAP_TARBALL"
|
||||
tar -C "$TMPDIR" --exclude .meteor/local -czf "$ENGINE_BOOTSTRAP_TARBALL" .meteor
|
||||
@@ -12,6 +12,8 @@ if [ "$TARGET_DIR" == "" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that the entire contents $TARGET_DIR is what we placed
|
||||
# there
|
||||
if [ -e "$TARGET_DIR" ] ; then
|
||||
echo "$TARGET_DIR already exists"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user