-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTaskfile.yml
More file actions
93 lines (79 loc) · 2.36 KB
/
Copy pathTaskfile.yml
File metadata and controls
93 lines (79 loc) · 2.36 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3"
vars:
PKGNAME:
sh: "sed -n 's/Package: *\\([^ ]*\\)/\\1/p' DESCRIPTION"
PKGVERS:
sh: "sed -n 's/Version: *\\([^ ]*\\)/\\1/p' DESCRIPTION"
PKGSRC:
sh: "basename $(pwd)"
tasks:
default:
deps: [install]
clean:
cmds:
- rm -rf src/*.o src/*.so
docs:
cmds:
- 'Rscript -e ''devtools::document(roclets = c("rd", "collate",
"namespace"))'''
compile-attributes:
cmds:
- "Rscript -e 'Rcpp::compileAttributes()'"
build:
deps: [docs, compile-attributes]
cmds:
- cd .. && R CMD build {{.PKGSRC}} --no-manual --no-build-vignettes
build-cran:
deps: [compile-attributes]
cmds:
- cd .. && R CMD build {{.PKGSRC}}
install:
deps: [compile-attributes]
cmds:
- R CMD INSTALL . --library=_libs --no-multiarch --with-keep.source
clean-install:
deps: [compile-attributes]
cmds:
- R CMD INSTALL --preclean --no-multiarch --with-keep.source {{.PKGNAME}}
check:
deps: [compile-attributes]
cmds:
- "Rscript -e 'devtools::check()'"
test:
deps: [compile-attributes]
cmds:
- "Rscript -e 'devtools::test()'"
readme:
cmds:
- Rscript -e 'devtools::build_readme()'
vignettes:
cmds:
- Rscript -e 'devtools::build_vignettes()'
update-libslope:
desc: Fetch and update the latest libslope release
vars:
VERSION:
sh: gh release view --repo jolars/libslope --json tagName --jq .tagName
cmds:
- echo "Fetching latest libslope release..."
- mkdir -p tmp
- mkdir -p inst/include
- gh release download --repo jolars/libslope --dir tmp/ --archive=tar.gz
--clobber
- cd tmp && tar xzf *.tar.gz --strip-components=1
- rm -rf src/slope
- mkdir -p src/slope
- cp -ri tmp/src/slope/* src/slope/
- echo "# WARNING! DO NOT MODIFY FILES IN THIS DIRECTORY" >>
src/slope/DO_NOT_MODIFY
- echo "# These files are automatically updated from
https://github.com/jolars/libslope" >> src/slope/DO_NOT_MODIFY
- rm -rf inst/include/slope
- rm -rf inst/include/slope.h
- cp -ri tmp/include inst/
- rm -rf tmp
- git add src/slope
- git add inst/include
- 'git commit -m "feat: update libslope to {{.VERSION}}" -m "Release:
https://github.com/jolars/libslope/releases/tag/{{.VERSION}}"'
silent: true