Created
May 13, 2011 10:32
-
-
Save rjbgoudie/970322 to your computer and use it in GitHub Desktop.
Rakefile for public packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def document(package) | |
rload = 'load(".RData")' | |
rdoc = "document(\"#{package}\")" | |
rsave = 'save.image()' | |
system "Rscript -e '#{rload}; #{rdoc}; #{rsave}'" | |
end | |
def build(package) | |
system "R CMD build #{package}" | |
end | |
def install(package) | |
system "R CMD INSTALL #{package}" | |
end | |
def test(package) | |
rdoc = "test(\"#{package}\")" | |
end | |
task :structmcmc do |t| | |
rm 'structmcmc/NAMESPACE' rescue nil | |
system 'rm -r structmcmc/man' rescue nil | |
document("structmcmc") | |
build("structmcmc") | |
install("structmcmc") | |
end | |
task :parental do |t| | |
rm 'parental/NAMESPACE' rescue nil | |
system 'rm -r parental/man' rescue nil | |
document("parental") | |
build("parental") | |
install("parental") | |
end | |
task :structmcmct do |t| | |
test("structmcmc") | |
end | |
task :structmcmci do |t| | |
build("structmcmc") | |
install("structmcmc") | |
end | |
task :parentalt do |t| | |
test("parental") | |
end | |
task :parentali do |t| | |
build("parental") | |
install("parental") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment