Skip to content

Commit 85377a5

Browse files
committed
Merge branch 'make'
2 parents 6cf2c62 + 6c897ed commit 85377a5

File tree

9 files changed

+56
-16
lines changed

9 files changed

+56
-16
lines changed

.Rbuildignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
^\.github$
22
^_litedown\.yml$
33
^pkgup$
4+
^doc$
5+
^Makefile$
6+
^public$

.github/workflows/pkgup.yaml

+4-16
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,14 @@ jobs:
3434
- name: build
3535
run: |
3636
echo "Revision:" $GITHUB_SHA >> ./DESCRIPTION
37-
R CMD build .
37+
make build
3838
- name: check
3939
run: |
40-
R CMD check --as-cran --no-manual $(ls -1t pkgup_*.tar.gz | head -n 1)
41-
- name: website
40+
make check
41+
- name: public
4242
if: github.ref == 'refs/heads/master'
4343
run: |
44-
R CMD INSTALL $(ls -1t pkgup_*.tar.gz | head -n 1) ## seems to be required
45-
Rscript -e 'invisible(file.copy("vignettes", "pkgup", recursive=TRUE))'
46-
Rscript -e 'litedown::fuse_site("pkgup")'
47-
mkdir -p public
48-
find pkgup -name '*.html' -print0 | cpio -pvdmB --null public
49-
mv public/pkgup/* public
50-
rm -r public/pkgup
51-
- name: repo
52-
if: github.ref == 'refs/heads/master'
53-
run: |
54-
mkdir -p public/src/contrib
55-
mv $(ls -1t pkgup_*.tar.gz | head -n 1) public/src/contrib
56-
Rscript -e 'tools::write_PACKAGES("public/src/contrib", fields="Revision")'
44+
make public
5745
- name: upload
5846
if: github.ref == 'refs/heads/master'
5947
uses: actions/upload-pages-artifact@v1

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.Rhistory
2+
*.html
3+
pkgup_*.tar.gz
4+
public
File renamed without changes.

pkgup/index.Rmd .pkgup/index.Rmd

File renamed without changes.

pkgup/manual.Rmd .pkgup/manual.Rmd

File renamed without changes.

pkgup/news.Rmd .pkgup/news.Rmd

File renamed without changes.
File renamed without changes.

Makefile

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.PHONY : clean build install doc repo
2+
3+
srcpath = $(wildcard ls -1t pkgup_*.tar.gz | head -n 1)
4+
5+
all:
6+
make clean
7+
make build
8+
make public
9+
10+
clean:
11+
rm -f $(srcpath)
12+
rm -rf pkgup.Rcheck
13+
rm -rf doc .pkgup/doc
14+
rm -rf .pkgup/repo
15+
rm -rf public
16+
17+
build:
18+
R CMD build .
19+
20+
check:
21+
R CMD check --as-cran --no-manual $(srcpath)
22+
23+
install:
24+
R CMD INSTALL $(srcpath)
25+
26+
doc:
27+
rm -rf .pkgup/doc
28+
mkdir -p .pkgup/doc/vignettes
29+
rsync -r --exclude 'doc' --exclude 'repo' .pkgup/* .pkgup/doc/
30+
cp -r vignettes/* .pkgup/doc/vignettes/
31+
Rscript -e 'litedown::fuse_site(".pkgup/doc")'
32+
#ls -aR .pkgup/doc
33+
34+
repo:
35+
rm -rf .pkgup/repo
36+
mkdir -p .pkgup/repo/src/contrib
37+
mv "$(srcpath)" .pkgup/repo/src/contrib
38+
Rscript -e 'tools::write_PACKAGES(".pkgup/repo/src/contrib", fields="Revision")'
39+
#ls -aR .pkgup/repo
40+
41+
public: install doc repo
42+
mkdir -p public
43+
cp -r .pkgup/repo/* public
44+
rsync -ravz --include '*/' --include='*.html' --exclude='*' .pkgup/doc/ public/
45+
#ls -aR public

0 commit comments

Comments
 (0)