Skip to content

Commit

Permalink
Updated release SOPs and scripts to reflect new repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hofnerb committed May 5, 2017
1 parent 4dac2f8 commit 69fafce
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 68 deletions.
54 changes: 12 additions & 42 deletions copy_Rout_to_Routsave.R
Expand Up @@ -5,57 +5,29 @@
# Author: Benjamin Hofner, 2012
#
# USAGE:
# Use either
# ## To copy test output
# Rscript copy_Rout_to_Routsave.R "which='mboostDevel'" "vignettes=FALSE"
# Rscript copy_Rout_to_Routsave.R "vignettes=FALSE"
# ## To copy vignette output
# Rscript copy_Rout_to_Routsave.R "which='mboostDevel'" "vignettes=TRUE"
# or
# ## To copy test output
# Rscript copy_Rout_to_Routsave.R "which='mboostPatch'" "vignettes=FALSE"
# ## To copy vignette output
# Rscript copy_Rout_to_Routsave.R "which='mboostPatch'" "vignettes=TRUE"
#
# Rscript copy_Rout_to_Routsave.R "vignettes=TRUE"
#
# ALTERNATIVE USAGE (with R CMD BATCH):
# Use either
# ## To copy test output
# R CMD BATCH "--args which='mboostDevel' vignettes=FALSE" copy_Rout_to_Routsave.R
# ## To copy vignette output
# R CMD BATCH "--args which='mboostDevel' vignettes=TRUE" copy_Rout_to_Routsave.R
# or
# ## To copy test output
# R CMD BATCH "--args which='mboostPatch' vignettes=FALSE" copy_Rout_to_Routsave.R
# R CMD BATCH "--args vignettes=FALSE" copy_Rout_to_Routsave.R
# ## To copy vignette output
# R CMD BATCH "--args which='mboostPatch' vignettes=TRUE" copy_Rout_to_Routsave.R
# R CMD BATCH "--args vignettes=TRUE" copy_Rout_to_Routsave.R
#
################################################################################

## Get command line arguments
args <- commandArgs(TRUE)
if (length(args) > 2)
stop("specify (at maximum) two arguments (i.e., which and vignettes)")
if (length(args) > 1)
stop("specify (at maximum) one arguments (i.e., vignettes)")
eval(parse(text=args))
if (length(args) == 0) {
which <- "mboostDevel"
vignettes <- FALSE
}
if (is.null(which))
which <- "mboostDevel"
if (is.null(vignettes))
vignettes <- FALSE

if (which == "mboostDevel") {
path <- "pkg/mboostDevel"
check_path <- "mboostDevel.Rcheck/"
} else {
if (which == "mboostPatch") {
path <- "pkg/mboostPatch"
check_path <- "mboost.Rcheck/"
} else {
stop("which is not correctly specified")
}
}
path <- "."
check_path <- "../mboost.Rcheck/"

################################################################################
## Copy output of test files
Expand All @@ -65,7 +37,9 @@ if (vignettes == FALSE) {
## Get relevant file names
ROUT <- list.files(path = check_path, pattern = ".Rout$", recursive = TRUE)
ROUT <- ROUT[!grepl("testthat", ROUT)]
ROUT <- ROUT[!grepl("386", ROUT)]
ROUT2 <- paste(check_path, ROUT, sep ="")
ROUT <- gsub("_x64", "", ROUT)

ROUT.SAVE <- list.files(path = path, pattern = ".Rout.save$", recursive = TRUE)
ROUT.SAVE <- paste(path, "/", ROUT.SAVE, sep ="")
Expand All @@ -86,9 +60,7 @@ if (vignettes == FALSE) {

cat("#########################################################################",
"# To revert changes simply use:",
ifelse(which == "mboostDevel",
"# svn revert --recursive pkg/mboostDevel/tests\n# or use\n# git checkout -- pkg/mboostDevel/vignettes",
"# svn revert --recursive pkg/mboostPatch/tests\n# or use\n# git checkout -- pkg/mboostPatch/vignettes"),
"# git checkout -- tests",
"#########################################################################",
sep = "\n")

Expand Down Expand Up @@ -125,9 +97,7 @@ if (vignettes == TRUE) {

cat("#########################################################################",
"# To revert changes simply use:",
ifelse(which == "mboostDevel",
"# svn revert --recursive pkg/mboostDevel/vignettes\n# or use\n# git checkout -- pkg/mboostDevel/vignettes",
"# svn revert --recursive pkg/mboostPatch/vignettes\n# or use\n# git checkout -- pkg/mboostPatch/vignettes"),
"# git checkout -- vignettes",
"#########################################################################",
sep = "\n")
} else {
Expand Down
57 changes: 31 additions & 26 deletions svn_release.txt
Expand Up @@ -7,26 +7,26 @@
Structure of the repository (branches)
--------------------------------------

patch (master branch) current version on CRAN
master branch: current version on CRAN

> add bug fixes only

devel current development version
devel branch: current development version

> add bug fixes and new functionality

experimental next generation development version / experimental stuff
other branches: next generation development version / experimental stuff

> add experimental material or start new generation package


Making a patch release
----------------------

Change to patch branch:
Change to master branch:
git checkout master

A bug was fixed in "patch"
A bug was fixed in "master"

Increase patch level in DESCRIPTION
Update Date: field in DESCRIPTION
Expand All @@ -36,21 +36,16 @@
R CMD build --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz

If differences to .Rout.save occure:
- Manually check differences. You might want to use something like:
cd mboost.Rcheck/tests
meld Examples/mboost-Ex.Rout.save ../mboost-Ex.Rout &
or
meld regtest-XXX.Rout.save regtest-XXX.Rout &

- If ok, copy new .Rout files to .Rout.save [1,2]:

Rscript copy_Rout_to_Routsave.R "which='mboostPatch'" "vignettes=FALSE"

- Update vignette .Rout.save files if necessary [1,2]:

- Copy new .Rout files to .Rout.save [1,2]:
Rscript copy_Rout_to_Routsave.R "vignettes=FALSE"

Rscript copy_Rout_to_Routsave.R "which='mboostPatch'" "vignettes=TRUE"
- Update vignette .Rout.save files if necessary [1,2]:
Rscript copy_Rout_to_Routsave.R "vignettes=TRUE"

- Now check for differences, e.g. using "git diff" or "meld"

[1] For details see
[1] For details see
http://r.789695.n4.nabble.com/Generate-Rout-save-files-for-vignettes-td4652752.html
[2] NOTE: Reference output should be produced without having the --timings option set.

Expand All @@ -62,11 +57,15 @@

Gives no warnings / errors.

Commit changes to "patch"
Commit changes to "master"

Now build package without test folder to be submitted to CRAN
R CMD buildCRAN --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz
To use the script copy it to R RHOME (< enter this in the console) /bin and make it executable.
Alternatively do the following:
mv .RbuildignoreCRAN .Rbuildignore
R CMD build --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz
git checkout -- .RbuildignoreCRAN .Rbuildignore

Check that reverse dependencies don't break.

Expand Down Expand Up @@ -96,16 +95,18 @@
R CMD build --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz

If differences to .Rout.save occure:
- Manually check differences
- If ok, copy new .Rout files to .Rout.save [3,4]:

- Copy new .Rout files to .Rout.save [3,4]:

Rscript copy_Rout_to_Routsave.R "which='mboostDevel'" "vignettes=FALSE"
Rscript copy_Rout_to_Routsave.R "vignettes=FALSE"

- Update vignette .Rout.save files if necessary [3,4]:

Rscript copy_Rout_to_Routsave.R "which='mboostDevel'" "vignettes=TRUE"
Rscript copy_Rout_to_Routsave.R "vignettes=TRUE"

- Now check for differences, e.g. using "git diff" or "meld"

[3] For details see
[3] For details see
http://r.789695.n4.nabble.com/Generate-Rout-save-files-for-vignettes-td4652752.html
[4] NOTE: Reference output should be produced without having the --timings option set.

Expand All @@ -122,14 +123,18 @@
Now build package without test folder to be submitted to CRAN
R CMD buildCRAN --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz
To use the script copy it to R RHOME (< enter this in the console) /bin and make it executable.
Alternatively do the following:
mv .RbuildignoreCRAN .Rbuildignore
R CMD build --resave-data --compact-vignettes . && R CMD check --as-cran --run-donttest mboost_XXX.tar.gz
git checkout -- .RbuildignoreCRAN .Rbuildignore

Check that reverse dependencies don't break.

Use web form at http://xmpalantir.wu.ac.at/cransubmit/.

Merge changes to "patch"
Merge changes to "master"

After a minor release, "devel" and "patch" are identical
After a minor release, "devel" and "master" are identical
(with the exeption of the package names -- mboost vs. mboostDevel).

Update webpage. See www_src.
Expand Down

0 comments on commit 69fafce

Please sign in to comment.