diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e0ffbd8..c76ee65 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -59,7 +59,7 @@ jobs: fail-fast: false matrix: config: - - {image: ghcr.io/insightsengineering/rstudio_4.1.2_bioc_3.14, tag: latest} + - {image: ghcr.io/insightsengineering/rstudio_4.2.1_bioc_3.15, tag: latest} steps: - name: Install package run: > diff --git a/DESCRIPTION b/DESCRIPTION index 28698bb..ba48874 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: staged.dependencies Type: Package Title: Install R packages from Particular Git Branches -Version: 0.2.6 +Version: 0.2.7 Authors@R: c( person("Adrian", "Waddell", email = "adrian.waddell@roche.com", role = c("aut", "cre")), person("Maximilian", "Mordig", email = "maximilian_oliver.mordig@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 2336ab5..df1ca81 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# staged.dependencies 0.2.7 + +* Fixed a bug whereby the cache file for packages with compiled code was not reset after installation thereby `dependency_table` failed on a 2nd run. + # staged.dependencies 0.2.6 * Fixed bug whereby `renv` did not recognize internal dependencies already installed. diff --git a/R/git_tools.R b/R/git_tools.R index 2dc1d2f..0413128 100644 --- a/R/git_tools.R +++ b/R/git_tools.R @@ -289,7 +289,11 @@ install_repo_add_sha <- function(repo_dir, # once we have installed or failed to install the package we reset the repo # so that further operations on the repo do not fail by the above # "the git directory contains changes" check - on.exit(git2r::reset(git2r::commits(repo_dir)[[1]], reset_type = "hard")) + on.exit({ + git2r::reset(git2r::commits(repo_dir)[[1]], reset_type = "hard") + # git clean + try(unlink(file.path(repo_dir, rlang::flatten_chr(git2r::status(repo_dir)$untracked)), recursive = TRUE)) + }) desc <- utils::modifyList(desc, metadata) write_dcf(source_desc, desc)