forked from oganm/5eInteractiveSheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappBuilder.R
69 lines (55 loc) · 2.1 KB
/
appBuilder.R
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
library(RInno)
library(dplyr)
library(magrittr)
depends = c("googledrive",
'magrittr',
'dplyr',
'diceSyntax',
'purrr',
'ogbox',
'glue',
'shiny',
'shinythemes',
'shinyjs',
'shinyWidgets',
'DT',
'shinyBS')
appVersion = '1.0.0'
unlink('sheet',recursive = TRUE)
unlink('sheetCI',recursive = TRUE,force = TRUE)
system('svn checkout https://github.com/oganm/import5eChar/trunk/inst/app')
unlink('app/.svn', recursive = TRUE, force = TRUE)
file.rename('app','sheet')
dir.create('sheetCI')
# git2r::clone('https://github.com/oganm/import5eChar.git',local_path = 'sheetCI')
#######################
create_app(app_name = "5eInteractiveSheet", app_dir = "sheet",include_R = TRUE)
file.copy('dice_icon.ico','sheet/default.ico',overwrite = TRUE)
file.copy('dice_icon.ico','sheet/setup.ico',overwrite = TRUE)
file.copy('infoafter.txt','sheet/infoafter.txt',overwrite = TRUE)
file.copy('infobefore.txt','sheet/infobefore.txt',overwrite = TRUE)
appR = readLines('sheet/global.R')
appR = c('options(ImThePortableClient = TRUE)',appR)
writeLines(appR,'sheet/global.R')
iss = readLines('sheet/5eInteractiveSheet.iss')
iss[2] %<>% gsub(pattern = '0.0.0',replacement = appVersion,.)
writeLines(iss,'sheet/5eInteractiveSheet.iss')
compile_iss()
#######################
create_app(
app_name = "import5eChar",
app_repo_url = "https://github.com/oganm/import5eChar",
pkgs = depends,
app_dir = 'sheetCI',include_R = TRUE
)
file.copy('dice_icon.ico','sheetCI/default.ico',overwrite = TRUE)
file.copy('dice_icon.ico','sheetCI/setup.ico',overwrite = TRUE)
file.copy('infoafter.txt','sheetCI/infoafter.txt',overwrite = TRUE)
file.copy('infobefore.txt','sheetCI/infobefore.txt',overwrite = TRUE)
appR = readLines('sheetCI/utils/app.R')
appR = c('options(ImThePortableClient = TRUE)',appR)
writeLines(appR,'sheetCI/utils/app.R')
iss = readLines('sheetCI/import5eChar.iss')
iss[2] %<>% gsub(pattern = '0.0.0',replacement = appVersion,.)
writeLines(iss,'sheetCI/import5eChar.iss')
compile_iss()