Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mcglm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leg
mcglm
Commits
2ee52523
Commit
2ee52523
authored
9 years ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Add buildPkg.R and put it in .Rbuildignore.
parent
f2c4003f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.Rbuildignore
+1
-0
1 addition, 0 deletions
.Rbuildignore
buildPkg.R
+86
-0
86 additions, 0 deletions
buildPkg.R
with
87 additions
and
0 deletions
.Rbuildignore
+
1
−
0
View file @
2ee52523
...
@@ -5,3 +5,4 @@
...
@@ -5,3 +5,4 @@
.Rd2pdf5504
.Rd2pdf5504
.Rd2pdf5516
.Rd2pdf5516
.Rd2pdf*
.Rd2pdf*
buildPkg.R
This diff is collapsed.
Click to expand it.
buildPkg.R
0 → 100644
+
86
−
0
View file @
2ee52523
##----------------------------------------------------------------------
## Script to build and verify the package.
if
(
!
grepl
(
x
=
getwd
(),
pattern
=
"/mcglm$"
)){
stop
(
"Move to /mcglm directory."
)
}
##----------------------------------------------------------------------
## Packages.
library
(
devtools
)
## Load the package (to make functiona available).
load_all
()
search
()
## Create/update NAMESPACE, *.Rd files.
document
()
## Check documentation.
check_doc
()
## Check functions, datasets, run examples, etc. Using cleanup = FALSE
## and check_dir = "../" will create a directory named mcglm.Rcheck
## with all the logs, manuals, figures from examples, etc.
check
(
cleanup
=
FALSE
,
manual
=
TRUE
,
vignettes
=
FALSE
,
check_dir
=
"../"
)
##----------------------------------------------------------------------
## Show all exported objects.
ls
(
"package:mcglm"
)
packageVersion
(
"mcglm"
)
##----------------------------------------------------------------------
## Build the package (it will be one directory up).
build
(
manual
=
TRUE
,
vignettes
=
FALSE
)
# build the binary version for windows (not used)
# build_win()
##----------------------------------------------------------------------
## Examples.
# Run examples from all functions of the package
# run_examples()
# Run examples from a specific function
# dev_example("yscale.components.right")
##----------------------------------------------------------------------
## Test installation.
## Test install with install.packages().
pkg
<-
paste0
(
"../mcglm_"
,
packageVersion
(
"mcglm"
),
".tar.gz"
)
install.packages
(
pkg
,
repos
=
NULL
)
## Test using devtools::install_git().
libTest
<-
path.expand
(
"~/R-test/"
)
if
(
file.exists
(
libTest
)){
file.remove
(
libTest
)
}
dir.create
(
path
=
libTest
)
.libPaths
(
new
=
c
(
libTest
,
.libPaths
()));
.libPaths
()
install_git
(
url
=
"http://git.leg.ufpr.br/wbonat/mcglm.git"
,
branch
=
"devel"
)
library
(
mcglm
)
packageVersion
(
"mcglm"
)
ls
(
"package:mcglm"
)
##----------------------------------------------------------------------
## Sending package tarballs and manual to remote server to be
## downloadable.
pkg.win
<-
paste0
(
"../mcglm_"
,
packageVersion
(
"mcglm"
),
".zip"
)
cmd.win
<-
paste
(
"cd ../mcglm.Rcheck && zip -r"
,
pkg.win
,
"mcglm"
)
system
(
cmd.win
)
man
<-
"../mcglm.Rcheck/mcglm-manual.pdf"
cmd
<-
paste
(
"scp -P $PATAXOP"
,
pkg
,
man
,
pkg.win
,
"leg@$PATAXO:~/public_html/mcglm/source"
)
system
(
cmd
)
##----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment