#!/bin/bash -x # This script forks R-x-y-branch from the trunk and updates the # local checkout directories accordingly # # Running the script initiates Grand Feature Freeze # # The script must be called with a single argument, containing the # dot-separated major.minor version string, e.g. "R-create-branch 2.9" # # Nicknames will be set at the beta transition, here we just blank out # the VERSION-NICK file # # The following variable will need customizing if the build environment # is changed 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 IFS=. read major minor << EOF $* EOF BRANCH=R-$major-$minor-branch VERSION=$major.$minor.0 let minor++ NEXT=$major.$minor.0 export REPOS=https://svn.r-project.org/R svn cp -m"Create $BRANCH" $REPOS/trunk $REPOS/branches/$BRANCH cd $LOCALDIR/r-release-branch/ umask 022 cd R svn switch $REPOS/branches/$BRANCH svn up || exit 1 echo "$VERSION alpha" > VERSION echo "" > VERSION-NICK aclocal -I m4 --force && autoconf --force svn commit -m "go to $VERSION alpha" cd $LOCALDIR/r-devel umask 022 cd R svn up || exit 1 echo "$NEXT Under development (unstable)" > VERSION aclocal -I m4 --force && autoconf --force svn commit -m "go to $NEXT devel" VERSIONINFO=$RELDIR/VERSION-INFO.dcf Rscript - << EOF x <- read.dcf("$VERSIONINFO") x[, "Devel"] <- "$NEXT" write.dcf(x, file="$VERSIONINFO") EOF # # Rsync step: Don't delete anything at destination # rsync -aOvuz --no-p $RELDIR/ $CRANDIR