#!/bin/sh # simple function to check return code check_error() { if test $? -ne 0; then echo "ERROR doing: $1"; exit 1; fi } set -x; BAKE_DIR=$TMPDIR/debea_publish rm -rf $BAKE_DIR check_error 'remove old dir' svn export svn+ssh://svn@debea.net/repos/debea/branches/debea_1_4 $BAKE_DIR; #svn export svn+ssh://svn@debea.net/repos/debea/trunk/ $BAKE_DIR; #cp -a . $BAKE_DIR check_error 'checkout sources' TEMP_BUILD_DIR=$BAKE_DIR/build OUTPUT_DIR=$BAKE_DIR/output BAKEFILE_PATHS=$BAKE_DIR:$OUTPUT_DIR/share/bakefile # home is for custom bakefile and wx installation DEBEA_ACLOCAL_FLAGS="-I $BAKE_DIR/aclocal -I $HOME/share/aclocal" export BAKEFILE_PATHS DEBEA_ACLOCAL_FLAGS # bake project files cd $BAKE_DIR/dba; bakefilize -c check_error 'dba bakefilize' bakefile_gen -d dba.bkgen check_error 'dba bakefile_gen' aclocal $DEBEA_ACLOCAL_FLAGS check_error 'dba aclocal' autoconf check_error 'dba autoconf' # build doxygen documentation rm -rf $TEMP_BUILD_DIR $OUTPUT_DIR mkdir -p $TEMP_BUILD_DIR $OUTPUT_DIR cd $TEMP_BUILD_DIR echo -n $OUTPUT_DIR $BAKE_DIR/dba/configure --prefix=$OUTPUT_DIR --enable-docs --with-doc-section=web check_error 'dba configure' # build doxygen documentation make docs; check_error 'dba make docs' make; check_error 'dba make' make install; check_error 'dba make install' make doc-install; check_error 'dba make doc-install' cd $BAKE_DIR/wxdba; bakefilize -c check_error 'wxdba bakefilize' bakefile_gen -d wxdba.bkgen check_error 'wxdba bakefile_gen' aclocal $DEBEA_ACLOCAL_FLAGS check_error 'wxdba aclocal' autoconf check_error 'wxdba autoconf' # discover version DEBEA_VERSION=$($OUTPUT_DIR/bin/dba-config --version) # create source tarballs/zips cd $BAKE_DIR/ mv dba dba-$DEBEA_VERSION; check_error 'dba rename' mv wxdba wxdba-$DEBEA_VERSION; check_error 'wxdba rename' tar zcvvf $OUTPUT_DIR/dba-$DEBEA_VERSION.tar.gz dba-$DEBEA_VERSION check_error 'dba tgz' tar zcvvf $OUTPUT_DIR/wxdba-$DEBEA_VERSION.tar.gz wxdba-$DEBEA_VERSION check_error 'wxdba tgz' zip -r $OUTPUT_DIR/dba-$DEBEA_VERSION.zip dba-$DEBEA_VERSION check_error 'dba zip' zip -r $OUTPUT_DIR/wxdba-$DEBEA_VERSION.zip wxdba-$DEBEA_VERSION check_error 'wxdba zip' # tarball/zip docs cd $OUTPUT_DIR/share/doc/dba/ mv html dba-docs-html-$DEBEA_VERSION; check_error 'dba docs rename' tar zcvvf $OUTPUT_DIR/debea-docs-$DEBEA_VERSION.tar.gz dba-docs-html-$DEBEA_VERSION check_error 'dba docs tgz' zip -r $OUTPUT_DIR/debea-docs-$DEBEA_VERSION.zip dba-docs-html-$DEBEA_VERSION check_error 'dba docs zip' cd $BAKE_DIR; # publish archives and documentation on website #scp debea-docs-$DEBEA_VERSION.tar.gz debea-docs-$DEBEA_VERSION.zip dba-$DEBEA_VERSION.tar.gz wxdba-$DEBEA_VERSION.tar.gz dba-$DEBEA_VERSION.zip wxdba-$DEBEA_VERSION.zip zork@debea.net:$DEBEA_WEB_DIR/download/ #scp $BAKE_DIR/make_stable_release.sh zork@debea.net:$DEBEA_WEB_DIR #ssh zork@debea.net -c "make_stable_release.sh $DEBEA_VERSION"