Open ColinFay opened 1 year ago
Do you mind creating a reprex for me? The following code looks correct to me.
library(rsconnect)
dir <- withr::local_tempdir()
dir.create(file.path(dir, "a", "b"), recursive = TRUE)
file.create(file.path(dir, c("x", "a/y", "a/b/z")))
#> [1] TRUE TRUE TRUE
listDeploymentFiles(dir)
#> [1] "a/b/z" "a/y" "x"
writeLines("y", file.path(dir, "a", ".rscignore"))
listDeploymentFiles(dir)
#> [1] "a/b/z" "x"
writeLines(c("y", "b"), file.path(dir, "a", ".rscignore"))
listDeploymentFiles(dir)
#> [1] "x"
Created on 2023-03-16 with reprex v2.0.2
Or are you asking about this?
#' * You can exclude additional files by listing them in in a `.rscignore`
#' file. This file must have one file or directory per line (with path
#' relative to the current directory). It doesn't support wildcards, or
#' ignoring files in subdirectories.
This is not technically supported, but it's a popular request, so I'll bite the bullet and implement it. See implementation in renv for a starting point: https://github.com/rstudio/renv/blob/main/R/renvignore.R.
Looking forward, should read both .rscignore
and .connectignore
.
Issue
The . rcsignore file doesn't work with :
folder/
instead offolder
Diagnosis
dev/
: thesetdiff
here is not smart enough : https://github.com/rstudio/rsconnect/blob/cf0972d0d69357cf2bc81ab140f940085aac92cb/R/bundleFiles.R#L200list.files()
(that created thecontents
object) will doWhen a directory can usually be written
folder/
in an ignore file.How to reproduce
.rscignore
=> works as expecteddev/
=> doesn't workdev/01_start.R
=> doesn't workHappy to help with submitting a patch if you want :)