-
Notifications
You must be signed in to change notification settings - Fork 2
/
R-create-branch
executable file
·54 lines (54 loc) · 1.49 KB
/
R-create-branch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/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