Skip to content

Commit

Permalink
Merge pull request #348 from carpentries/fix-347
Browse files Browse the repository at this point in the history
set renv/sandbox as optional gitignore item
  • Loading branch information
zkamvar authored Oct 7, 2022
2 parents e99afc5 + 7e261a0 commit 0abf2de
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
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

0 comments on commit 0abf2de

Please sign in to comment.