diff --git a/Dockerfile b/Dockerfile index 306138b..b56b581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,4 +43,5 @@ RUN R -e 'options( \ renv::install(c("stringi", "git2r")); \ renv::restore(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"))' -COPY . . \ No newline at end of file +COPY . . +COPY .git/ ./.git/ diff --git a/resources/phenotypes/organise_phenotypes.rmd b/resources/phenotypes/organise_phenotypes.rmd index dffdb97..544bf2d 100755 --- a/resources/phenotypes/organise_phenotypes.rmd +++ b/resources/phenotypes/organise_phenotypes.rmd @@ -149,8 +149,7 @@ organise_phenotype("bmiz", phenotypes, df, gen_covs, covdat, agebins, pl=TRUE) Get git version ```{r version} -g <- git2r::revparse_single(here(), "HEAD") -g +try(git2r::revparse_single(here(), "HEAD"), silent=TRUE) ``` Session info diff --git a/resources/render.r b/resources/render.r index 512c4a9..e00dccb 100644 --- a/resources/render.r +++ b/resources/render.r @@ -2,4 +2,5 @@ library(here) library(rmarkdown) args <- commandArgs(T) -rmarkdown::render(args[1], output_dir=args[2]) +print(args) +rmarkdown::render(args[1], intermediates_dir=args[2], knit_root_dir=args[2], output_dir=args[2]) \ No newline at end of file