Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 20, 2023
1 parent 42e7cd3 commit 96a47bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inst/update-ppm-url.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# old binaries only guaranteed to be available for frozen snapshot
# https://community.rstudio.com/t/binary-packages-removed-once-new-package-version-released-on-ppm/177282/2
lockfile = renv::lockfile_read()
rspm_url = lockfile$R$Repositories$RSPM
lockfile <- renv::lockfile_read()
rspm_url <- lockfile$R$Repositories$RSPM
current_date <- Sys.Date() - 3 # available for sure

to_substract <- max(0, as.integer(strftime(current_date,'%u')) - 5)
to_substract <- max(0, as.integer(strftime(current_date, "%u")) - 5)
ensured_weekday <- current_date - to_substract
cat(paste0("Snapshot day for PPM moved to ", ensured_weekday))
updated_url <- gsub("[0-9]{4}-[0-9]{2}-[0-9]{2}$", ensured_weekday, rspm_url)
Expand Down

0 comments on commit 96a47bc

Please sign in to comment.