freetdm: changed mkrelease.sh to ship ABI compatibility test reports with the

generated release.
This commit is contained in:
Arnaldo Pereira 2011-03-02 22:42:59 -03:00
parent 64b24240c0
commit 9b9ed009b7
1 changed files with 22 additions and 7 deletions

View File

@ -89,6 +89,11 @@ then
mkdir -p $INSTALLPREFIX || exit 1 mkdir -p $INSTALLPREFIX || exit 1
fi fi
if [ ! -d $INSTALLPREFIX/bin-releases ]
then
mkdir -p $INSTALLPREFIX/bin-releases || exit 1
fi
# attempt to compile freetdm # attempt to compile freetdm
echo "Build freetdm and mod_freetdm now..." echo "Build freetdm and mod_freetdm now..."
make all mod_freetdm || exit 1 make all mod_freetdm || exit 1
@ -101,19 +106,16 @@ release="freetdm-$VERSION"
# ABI compatibility check # ABI compatibility check
if [ -x /usr/local/bin/ftdm_abi_check.py ]; then if [ -x /usr/local/bin/ftdm_abi_check.py ]; then
/usr/local/bin/ftdm_abi_check.py --release_path=$(pwd) --archive_path=/usr/local/freetdm_releases --major_version=$major /usr/local/bin/ftdm_abi_check.py --release_path=$(pwd) --archive_path=$INSTALLPREFIX/bin-releases --version=$VERSION
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ABI compabitility test failed, not creating release. Either increment the major version number or fix the interface." echo "ABI compabitility test failed, not creating release. Either increment the major version number or fix the interface."
exit 1 exit 1
fi fi
else else
echo -ne "\n\nWARNING: /usr/local/bin/abi_check.py not found, skipping ABI compatibility test\n\n" echo -ne "\n\nWARNING: /usr/local/bin/ftdm_abi_check.py not found, skipping ABI compatibility test\n\n"
fi fi
# clean the source tree
rm -rf $LIBSNG_ISDN_DIR $LIBSNG_SS7_DIR
make clean
make mod_freetdm-clean
if [ $NODOCS = "NO" ] if [ $NODOCS = "NO" ]
then then
make dox || exit 1 make dox || exit 1
@ -121,15 +123,28 @@ fi
echo "Creating $release ($major.$minor.$micro) at $INSTALLPREFIX/$release (directory will be removed if exists already) ... " echo "Creating $release ($major.$minor.$micro) at $INSTALLPREFIX/$release (directory will be removed if exists already) ... "
mkdir -p $INSTALLPREFIX/$release mkdir -p $INSTALLPREFIX/$release $INSTALLPREFIX/bin-releases/$major/$release
cp -r ./* $INSTALLPREFIX/$release cp -r ./* $INSTALLPREFIX/$release
# copy ABI compatibility reports to release
if [ -d compat_reports ]; then
cp -r ./compat_reports $INSTALLPREFIX/$release
rm -rf ./compat_reports
fi
find $INSTALLPREFIX/ -name .libs -exec rm -rf {} \; find $INSTALLPREFIX/ -name .libs -exec rm -rf {} \;
find $INSTALLPREFIX/ -name .deps -exec rm -rf {} \; find $INSTALLPREFIX/ -name .deps -exec rm -rf {} \;
find $INSTALLPREFIX/ -name *.so -exec rm -rf {} \; find $INSTALLPREFIX/ -name *.so -exec rm -rf {} \;
find $INSTALLPREFIX/ -name *.lo -exec rm -rf {} \; find $INSTALLPREFIX/ -name *.lo -exec rm -rf {} \;
cp -r ./* $INSTALLPREFIX/bin-releases/$major/$release
cp -r ./.libs $INSTALLPREFIX/bin-releases/$major/$release
# clean the source tree
rm -rf $LIBSNG_ISDN_DIR $LIBSNG_SS7_DIR
make clean
make mod_freetdm-clean
tar -C $INSTALLPREFIX -czf $INSTALLPREFIX/$release.tar.gz $release/ tar -C $INSTALLPREFIX -czf $INSTALLPREFIX/$release.tar.gz $release/