blob: ec85341d0ffbcd11c808715f44c1ede56bbe430f (
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
46
47
48
49
50
51
52
53
54
55
|
#!/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 "Running swig to generate the Java and Python API"
(cd "$DEST/build_posix" &&
../configure --enable-java --enable-python &&
(cd lang/java && make ../../../lang/java/wiredtiger_wrap.c) &&
(cd lang/python && make ../../../lang/python/wiredtiger_wrap.c) &&
make distclean &&
find . -type d -a -empty | xargs rmdir &&
find . -type d -a -empty | xargs rmdir &&
find . -type d -a -empty | xargs rmdir) > /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/NEWS $PKG/README $PKG/docs | \
bzip2 -9 > $PKG-docs.tar.bz2)
rm -r $DEST
|