Skip to content

Commit 3d7dda3

Browse files
committed
Fix release packaging script
1 parent 5706a64 commit 3d7dda3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tools/package.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
#!/bin/bash -v
1+
#!/bin/bash
22
# Packages MPack up for amalgamation release. You can run tools/amalgamate.sh
3-
# instead of this script if you just want to generate mpack.h/mpack.c.
3+
# instead of this script if you just want to generate mpack.h and mpack.c.
4+
5+
set -v
6+
set -e
47

58
[[ -z $(git status --porcelain) ]] || { git status --porcelain; echo "Tree is not clean!" ; exit 1; }
69
"`dirname $0`"/clean.sh
710

811
# generate package contents
912
. "`dirname $0`"/amalgamate.sh
1013
. "`dirname $0`"/gendocs.sh
11-
cp -ar build/docs/html build/amalgamation/docs
14+
cp -ar .build/docs/html .build/amalgamation/docs
1215
sed -i '/#define MPACK_AMALGAMATED 1/a\
13-
#define MPACK_RELEASE_VERSION 1' build/amalgamation/src/mpack/mpack.h
16+
#define MPACK_RELEASE_VERSION 1' .build/amalgamation/src/mpack/mpack.h
1417

1518
# create package
1619
NAME=mpack-amalgamation-$VERSION
17-
tar -C build/amalgamation --transform "s@^@$NAME/@" -czf build/$NAME.UNTESTED.tar.gz `ls build/amalgamation` || exit $?
20+
tar -C .build/amalgamation --transform "s@^@$NAME/@" -czf .build/$NAME.UNTESTED.tar.gz `ls .build/amalgamation` || exit $?
1821

1922
# build and run all unit tests
20-
pushd build/amalgamation
21-
scons -j4 all=1 || exit $?
23+
pushd .build/amalgamation
24+
tools/unit.sh all || exit $?
2225
popd
2326

2427
# done!
25-
mv build/$NAME.UNTESTED.tar.gz $NAME.tar.gz
28+
mv .build/$NAME.UNTESTED.tar.gz $NAME.tar.gz
2629
echo Created $NAME.tar.gz
27-

0 commit comments

Comments
 (0)