Skip to content

Commit

Permalink
update prep_release script
Browse files Browse the repository at this point in the history
Allow package check to pass with NOTEs, just not ERROR or WARNING
entries.  Also automatically insert the current version in NEWS.md for
any line matching "# chiimp dev".
  • Loading branch information
ressy committed Jul 23, 2018
1 parent 2493e5d commit 3590d10
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .utils/prep_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ set -e

VERSION=$1

chiimp_check='x<-devtools::check();quit(save="no",status=length(c(x$errors,x$warnings,x$notes)))'
chiimp_check='x<-devtools::check();quit(save="no",status=length(c(x$errors,x$warnings)))'

# Update version in download link in README
VER_MSG="The most recent released version is"
TAG_URL="https\\://github.com/ShawHahnLab/chiimp/releases/tag"
SED_README="s:$VER_MSG \\[[0-9.]+\\]\\($TAG_URL/[0-9.]+\\)\\.:$VER_MSG [$VERSION]($TAG_URL/$VERSION).:"
sed -i -r "$SED_README" README.md

# Update version in DESCRIPTION
# Update version in DESCRIPTION and NEWS.md
sed -i "s/Version: .*$/Version: $VERSION/" DESCRIPTION
sed -i "s/# chiimp dev/# chiimp $VERSION/" NEWS.md

R --slave --vanilla -e "$chiimp_check"
R --slave --vanilla -e "rmarkdown::render('GUIDE.Rmd', output_file = 'GUIDE.pdf', quiet = TRUE)"
Expand All @@ -24,3 +25,8 @@ pushd ..
zip -r chiimp-v${VERISON}.zip chiimp/*
tar czvf chiimp-v${VERSION}.tgz chiimp/*
popd

# TODO show reminder of checks before tagging a release:
# * full test on all three platforms
# * make sure NEWS.md contains all updates under a heading matching this version
# * make sure GUIDE.Rmd is up-to-date and the rendered GUIDE.pdf is correct

0 comments on commit 3590d10

Please sign in to comment.