#!/bin/bash -x # This script creates the final official release # The script must be called with a single argument, containing the # dot-separated major.minor.pl version string, e.g. "R-build-dist 2.10.0" # Be very careful in making changes to it, as incorrect # actions may be difficult to revert # These two lines require local customization LOCALDIR=$HOME RELDIR=$HOME/R-release/ CRANDIR=cran.r-project.org:/srv/ftp/pub/R/src/base #--- no changes should be necessary below this line REL=$* IFS=. read major minor pl << EOF $* EOF TAG=R-$major-$minor-$pl BASEDIR=$LOCALDIR/r-release-branch SRCDIR=$BASEDIR/R BUILDDIR=$BASEDIR/BUILD-dist REPOS=https://svn.r-project.org/R umask 022 # cd $SRCDIR svn up || exit 1 echo $REL > VERSION tools/rsync-recommended || exit 1 svn commit -m "Prepare for release $REL" svn up cd .. rm -rf $BUILDDIR mkdir $BUILDDIR cd $BUILDDIR # Local config. Required on OSX Snow Leopard cp ../config.site . ../R/configure --enable-maintainer-mode || exit 1 make -j4 || exit 1 make dist || exit 1 # cd $SRCDIR svn cp -m "Tag version $REL" . $REPOS/tags/$TAG # cd $BUILDDIR RNOW=`echo R*.tar.gz` cp $RNOW $RELDIR/R-$major cp doc/{FAQ,RESOURCES,COPYING*,AUTHORS,THANKS} NEWS $RELDIR cp doc/html/NEWS.html $RELDIR # cd $SRCDIR cp *NEWS README INSTALL $RELDIR # cd $RELDIR ln -sf R-$major/$RNOW R-latest.tar.gz # # Rsync step: Don't delete anything at destination # rsync -aOvuz --no-p $RELDIR/ $CRANDIR # # Update version info in r-release-branch: # cd $SRCDIR echo $REL "Patched" > VERSION svn commit -m "setup for patched version" svn up # cat <