Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set renv/sandbox as optional gitignore item #348

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sandpaper
Title: Create and Curate Carpentries Lessons
Version: 0.10.3
Version: 0.10.4
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
14 changes: 13 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# sandpaper 0.10.4

BUG FIX
-------

* `renv/sandbox` no longer required in `.gitignore`. A new bug introduced in
0.10.2 caused all lessons built before 0.10.2 to fail when rebuilt on CI.
This was due to the assumption that the .gitignore item `renv/sandbox` was
strictly necessary with no clear method to automatically update a file like
this (reported: @zkamvar, #347; fixed: @zkamvar, #348).

# sandpaper 0.10.3

BUG FIX
Expand All @@ -7,7 +18,7 @@ BUG FIX
workflow templates folder was causing workflow update script to create pull
requests for the workflows every week when they should have been much less
frequent (the irony of this commit is that it will trigger another pull
request).
request) (fixed: @zkamvar, #346).

# sandpaper 0.10.2

Expand All @@ -16,6 +27,7 @@ BUG FIX

* The default `.gitignore` now has `renv/sandbox` to avoid a sandbox directory
from being tracked by git. (see https://github.com/rstudio/renv/issues/1088)
(reported: @zkamvar; #344, fixed: @zkamvar, #343)

CONTINUOUS INTEGRATION
----------------------
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ check_order <- function(order, what) {
# to reload this thing every time we need it
gitignore_items <- function() {
ours <- readLines(template_gitignore(), encoding = "UTF-8")
ours[!grepl("^([#].+?|)$", trimws(ours))]
ours[!grepl("^([#].+?|.+? # OPTIONAL|)$", trimws(ours))]
}
#nocov end

4 changes: 2 additions & 2 deletions inst/templates/gitignore-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ docs/
# translation temp files
po/*~

# renv sandbox
renv/sandbox
# renv sandbox needed for renv version 0.16.0
renv/sandbox # OPTIONAL
4 changes: 0 additions & 4 deletions tests/testthat/_snaps/create_lesson.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
.Renviron
docs/
po/*~
renv/sandbox

# Destruction of the .gitignore file renders the lesson incorrect [ansi]

Expand Down Expand Up @@ -54,7 +53,6 @@
.Renviron
docs/
po/*~
renv/sandbox

# Destruction of the .gitignore file renders the lesson incorrect [unicode]

Expand Down Expand Up @@ -83,7 +81,6 @@
.Renviron
docs/
po/*~
renv/sandbox

# Destruction of the .gitignore file renders the lesson incorrect [fancy]

Expand Down Expand Up @@ -112,5 +109,4 @@
.Renviron
docs/
po/*~
renv/sandbox