summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/dist/s_release
blob: f6d541dae40f411e2158a708f9f649ba9281a650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# Build a WiredTiger release package.

set -e

. ../RELEASE_INFO || exit 1

RELEASE_DIR=`pwd`/../releases
mkdir -p $RELEASE_DIR

pkgver="$1"
if test -z "$pkgver" ; then
	pkgver="$WIREDTIGER_VERSION"
fi
PKG="wiredtiger-$pkgver"
DEST="$RELEASE_DIR/$PKG"

rm -rf $DEST ; mkdir -p $DEST
EXCLUSIONS=`sed -e '/^#/d' -e 's/^/--exclude /' < s_release.list`

if [ -d ../.hg ] ; then
	echo "Running 'hg archive' to copy the tree"
	(cd .. && hg archive $EXCLUSIONS $DEST)
elif [ -d ../.git ] ; then
	echo "Running 'git archive' to copy the tree"
	(cd .. && git archive HEAD) | (cd $DEST && tar xf - $EXCLUSIONS)
else
	echo "$0 must be run in a Git or Mercurial tree"
	exit 1
fi

echo "Running 'dist/s_all' in the release tree"
(cd "$DEST/dist" && env WT_RELEASE_BUILD=yes sh s_all -A > /dev/null)

echo "Building documentation"
(cd "$DEST/dist" && sh s_docs > /dev/null)

echo "Packing release into $RELEASE_DIR/$PKG.tar.bz2"
(cd "$RELEASE_DIR" && tar cf - $PKG | bzip2 -9 > $PKG.tar.bz2)

echo "Packing documentation into $RELEASE_DIR/$PKG-docs.tar.bz2"
(cd "$RELEASE_DIR" && tar cf - $PKG/LICENSE $PKG/README $PKG/docs | \
    bzip2 -9 > $PKG-docs.tar.bz2)

rm -r $DEST