
* Makefile.am: Add new rule 'snapshot'. * lrde-upload.sh: Make the snapshot names more explicit. --- ChangeLog | 8 ++++++++ Makefile.am | 18 ++++++++++++++++++ lrde-upload.sh | 6 +++--- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ed3dfc..16747a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-07-09 Guillaume Lazzara <lazzara@lrde.epita.fr> + + Improve snapshot generation. + + * Makefile.am: Add new rule 'snapshot'. + + * lrde-upload.sh: Make the snapshot names more explicit. + 2009-07-13 Roland Levillain <roland@lrde.epita.fr> * Makefile.am: Add a FIXME. diff --git a/Makefile.am b/Makefile.am index 8982f66..f5646f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -127,4 +127,22 @@ dist-hook: autoreconf -f -v -i; \ find . -name autom4te.cache | xargs rm -rf \ ) + + +# Set the package version to olena-x.x-snapshot-dd-mm-yy +# +# Do not check NEWS file (this is not a release so there is no +# entries in this file for this package). +# +snapshot: + current_date=`date +'%d-%m-%y'` \ + && sed -e "s/^\(AC_INIT(\[Olena\],\) \[\([\.[:alnum:]]*\)\(-snapshot-.*-[[:alnum:]]*\)*\], \(.*\)/\1 [\2-snapshot-$$current_date], \4/g" \ + -e 's/ check-news / /g' \ + $(srcdir)/configure.ac > $(srcdir)/configure.ac.tmp \ + && cp -f $(srcdir)/configure.ac $(srcdir)/configure.ac.old \ + && cp -f $(srcdir)/configure.ac.tmp $(srcdir)/configure.ac \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && mv -f $(srcdir)/configure.ac.old $(srcdir)/configure.ac + #>> +# && $(srcdir)/build-aux/lrde-upload.sh \ No newline at end of file diff --git a/lrde-upload.sh b/lrde-upload.sh index 039889b..31cd16d 100755 --- a/lrde-upload.sh +++ b/lrde-upload.sh @@ -13,7 +13,7 @@ DEST_DOC=$DEST/doc/milena # Retrieve the package version VERSION=`autoconf --trace='AC_INIT:$2'` CURRENT_DATE=`date +'%d_%m_%y'` -REV=$VERSION-$CURRENT_DATE +REV=$VERSION-snapshot-$CURRENT_DATE # Always do "cp then mv" when uploading the file, so that someone # cannot start a download why the destination file is incomplete. @@ -21,8 +21,8 @@ REV=$VERSION-$CURRENT_DATE # Upload the tarball mkdir -p $DEST -# Delete tarballs older than 2 days.. -find $DEST -maxdepth 1 -type f -mtime +2 -exec rm -f {} \; +# Delete tarballs older than 2 days. +find $DEST -maxdepth 1 -type f -mtime +2 -name 'olena-*-snapshot-*' -exec rm -f {} \; # tar.gz cp -f olena-$VERSION.tar.gz $DEST/olena-$REV.tar.gz.tmp -- 1.5.6.5