-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sh
executable file
·37 lines (30 loc) · 1.24 KB
/
build.sh
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
#/bin/bash
########## Use the following command to register shortcut ######################
# dipsaus::rs_add_shortcut(5, {
# dipsaus::rs_focus_console()
# cwd <- getwd()
# on.exit({
# setwd(cwd)
# })
# proj_dir <- .rs.getProjectDirectory()
# build_sh <- file.path(proj_dir, "build.sh")
# if(file.exists(build_sh)) {
# system2("bash", shQuote(build_sh), env = c("USE_DIPSAUS=1"))
# }
# devtools::load_all(proj_dir)
# setwd(cwd)
# }, force = TRUE)
################################################################################
cd inst/three-brain-js
npm run build
cd ../../
cp -r inst/three-brain-js/dist inst/threeBrainJS
# git submodule update --recursive --remote
if [[ "$USE_DIPSAUS" != "1" ]]; then
Rscript -e "devtools::document(roclets = c('rd', 'collate', 'namespace', 'vignette'))"
source_file=$(Rscript -e "cat(devtools::build(vignettes = FALSE, manual = FALSE, path = './adhoc/', quiet = TRUE))")
R CMD INSTALL --preclean --no-multiarch --with-keep.source "$source_file"
fi
LAST_RELEASE=$(grep "SHA: " "CRAN-SUBMISSION")
echo "## Changes since last CRAN release" > CHANGELOG.md
git log ${LAST_RELEASE:5}..HEAD --no-merges --graph --pretty=format:'%C(auto)`%h%d`%Creset %C(cyan)[_`%cn`_]%Creset: %s' >> CHANGELOG.md