From abdc67ff4e3509745b9c4ad10c47a2b1d9b10d6f Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Mon, 18 Jan 2010 10:30:11 +0000 Subject: [PATCH] Improve releaser script by adding documentation generation. --- make_release.sh | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/make_release.sh b/make_release.sh index e5a1f8f9..e1b87587 100755 --- a/make_release.sh +++ b/make_release.sh @@ -6,7 +6,7 @@ set -e # Retrieve libnfc version from configure.ac LIBNFC_VERSION=$(grep AC_INIT configure.ac | sed 's/^.*(\(.*\))/\1/g' | awk -F', ' '{ print $2 }') -## Easiest part: GNU/linux, BSD and other POSIX systems. +# Easiest part: GNU/linux, BSD and other POSIX systems. LIBNFC_AUTOTOOLS_ARCHIVE=libnfc-$LIBNFC_VERSION.tar.gz if [ ! -f $LIBNFC_AUTOTOOLS_ARCHIVE ]; then @@ -18,10 +18,35 @@ if [ ! -f $LIBNFC_AUTOTOOLS_ARCHIVE ]; then # We are ready to make a good autotools release. autoreconf -vis && ./configure && make dist + + # Clean up + make distclean else echo "Autotooled archive (GNU/Linux, BSD, etc.) is already done: skipped." fi +# Documentation part +LIBNFC_DOC_DIR=libnfc-doc-$LIBNFC_VERSION +LIBNFC_DOC_ARCHIVE=$LIBNFC_DOC_DIR.zip + +if [ ! -f $LIBNFC_DOC_ARCHIVE ]; then + if [ -d $LIBNFC_DOC_DIR ]; then + rm -rf $LIBNFC_DOC_DIR + fi + + # Build documentation + autoreconf -vis && ./configure --enable-doc && make doc + + # Create archive + cp -r doc/html $LIBNFC_DOC_DIR + zip -r $LIBNFC_DOC_ARCHIVE $LIBNFC_DOC_DIR + + # Clean up + make distclean +else + echo "Documentation archive is already done: skipped." +fi + # Windows part LIBNFC_WINDOWS_DIR=libnfc-$LIBNFC_VERSION-winsdk LIBNFC_WINDOWS_ARCHIVE=$LIBNFC_WINDOWS_DIR.zip @@ -39,9 +64,9 @@ if [ ! -f $LIBNFC_WINDOWS_ARCHIVE ]; then svn export win32 $LIBNFC_WINDOWS_DIR/win32 # Copy important files - cp AUTHORS $LIBNFC_WINDOWS_DIR/ - cp LICENSE $LIBNFC_WINDOWS_DIR/ - cp README $LIBNFC_WINDOWS_DIR/ + cp AUTHORS $LIBNFC_WINDOWS_DIR/AUTHORS.txt + cp LICENSE $LIBNFC_WINDOWS_DIR/LICENSE.txt + cp README-Windows.txt $LIBNFC_WINDOWS_DIR/ # Remove Autotools Makefile.am find $LIBNFC_WINDOWS_DIR/ -name Makefile.am | xargs rm -f