Skip to content

Commit

Permalink
Merge pull request #532 from milanmlft/fix-build-status
Browse files Browse the repository at this point in the history
Make sure root_path() always points to lesson root
  • Loading branch information
zkamvar committed Oct 16, 2023
2 parents 8e37f83 + da83749 commit bbf03c2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Authors@R: c(
family = "Gruson",
role = c("ctb"),
email = "hugo.gruson+R@normalesup.org"),
person(given = "Milan",
family = "Malfait",
role = c("ctb"),
email = "milan.malfait94@gmail.com",
comment = c(ORCID = "0000-0001-9144-3701")),
person())
Description: We provide tools to build a Carpentries-themed lesson repository
into an accessible standalone static website. These include local tools and
Expand Down
11 changes: 11 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# sandpaper 0.14.0.9000 (unreleased)

## NEW FEATURES

* Content for learners now accessible through instructor view. The instructor
view "More" dropdown menu item will now have links to learner view items
appended. Note that when clicking these links, the user will remain in
instructor view. This behaviour may change in future iterations (reported:
@karenword, #394; fixed: @ErinBecker, #530, reviewed: @zkamvar)

## BUG FIX

* Internal `build_status()` function: make sure `root_path()` always points
to lesson root (reported: @milanmlft, #531; fixed: @milanmlft, #532)

## MISC

* Added @milanmlft as contributor

# sandpaper 0.14.0 (2023-10-02)

## NEW FEATURES
Expand Down
6 changes: 1 addition & 5 deletions R/utils-built-db.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,7 @@ build_status <- function(sources, db = "site/built/md5sum.txt", rebuild = FALSE,

# If we have a single source passed in, this means that we want to update it
# in the database and force it to rebuild
if (build_one) {
root_path <- root_path(sources)
} else {
root_path <- fs::path_common(sources)
}
root_path <- root_path(fs::path_common(sources)) # ensure we're at the actual lesson root path
sources <- fs::path_rel(sources, start = root_path)

built_path <- fs::path_rel(fs::path_dir(db), root_path)
Expand Down

0 comments on commit bbf03c2

Please sign in to comment.