From ce66a792fecc35c304807314ed0b6f7d2ce59993 Mon Sep 17 00:00:00 2001 From: Colin Millar Date: Mon, 19 Feb 2024 18:13:48 +0100 Subject: [PATCH] add version to title and bump version name --- .Rbuildignore | 2 ++ DESCRIPTION | 5 +++-- NAMESPACE | 1 + R/app_ui.R | 5 +++-- dev/03_deploy.R | 11 +++++++++++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 243b934..d7866a8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,5 @@ $run_dev.* ^.here$ ^app\.R$ ^rsconnect$ +^\.github$ +^renv\.lock$ diff --git a/DESCRIPTION b/DESCRIPTION index b2cf5ef..280daea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: icesTEASD Title: An Amazing Shiny App -Version: 0.0.0.9000 +Version: 0.0.0.9002 Authors@R: c(person("Neil", "Maginnis", role=c("aut","cre"), email="neil.maginnis@ices.dk"), person("Colin", "Millar", role="aut")) @@ -18,7 +18,8 @@ Imports: shiny (>= 1.8.0), icesSD, icesSAG, - dplyr + dplyr, + desc Suggests: pkgload Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index cd105ca..a3e459b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,7 @@ importFrom(bslib,bs_theme) importFrom(bslib,card_body) importFrom(bslib,layout_column_wrap) importFrom(bslib,value_box) +importFrom(desc,desc_get_version) importFrom(dplyr,bind_rows) importFrom(dplyr,filter) importFrom(dplyr,mutate) diff --git a/R/app_ui.R b/R/app_ui.R index e8b6c02..8b0ea27 100644 --- a/R/app_ui.R +++ b/R/app_ui.R @@ -7,6 +7,7 @@ #' @importFrom htmltools css h1 tags #' @importFrom bsicons bs_icon #' @importFrom DT dataTableOutput DTOutput +#' @importFrom desc desc_get_version #' #' @noRd app_ui <- function(request) { @@ -16,11 +17,11 @@ app_ui <- function(request) { navbarPage( theme = bs_theme(bootswatch = "cyborg"), - title = ("icesTEASD: Tool for Error Alignment of Stock Databases"), + title = paste0("icesTEASD: Tool for Error Alignment of Stock Databases, v", desc_get_version()), tabPanel("SID SAG checks", mod_SID_SAG_checks_ui("SID_SAG_checks_1") ), - tabPanel("User checks", + tabPanel("User checks", mod_user_checks_ui("user_checks_1")) ) ) diff --git a/dev/03_deploy.R b/dev/03_deploy.R index bc208f7..0890570 100644 --- a/dev/03_deploy.R +++ b/dev/03_deploy.R @@ -20,6 +20,17 @@ rhub::check_for_cran() # Deploy +# we deploy only through github actions, and when code is changed on the main +# branch :) + +# update renv.lock file - important to do this in a clean R +# otherwise devtools etc all get put into the renv file +file <- renv::lockfile_create(exclude = desc::desc_get_field("Package")) +renv::lockfile_write(file) + +# bump description file +desc::desc_bump_version(which = "dev") + ## Local, CRAN or Package Manager ---- ## This will build a tar.gz that can be installed locally, ## sent to CRAN, or to a package manager