Skip to content

Commit 4515c67

Browse files
pre-commit-ci[bot]lorenzwalthert
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 42e7cd3 commit 4515c67

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ repos:
8484
inst/hooks/exported/pkgdown.R|
8585
tests/testthat/in/.*|
8686
inst/renv-update\.R|
87+
inst/update-ppm-url.R|
8788
inst/update-dependency-graph-existing-packages\.R|
8889
inst/update-existing-hook-dependencies\.R|
8990
renv/activate.R|

inst/update-ppm-url.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# old binaries only guaranteed to be available for frozen snapshot
22
# https://community.rstudio.com/t/binary-packages-removed-once-new-package-version-released-on-ppm/177282/2
3-
lockfile = renv::lockfile_read()
4-
rspm_url = lockfile$R$Repositories$RSPM
3+
lockfile <- renv::lockfile_read()
4+
rspm_url <- lockfile$R$Repositories$RSPM
55
current_date <- Sys.Date() - 3 # available for sure
66

7-
to_substract <- max(0, as.integer(strftime(current_date,'%u')) - 5)
7+
to_substract <- max(0, as.integer(strftime(current_date, "%u")) - 5)
88
ensured_weekday <- current_date - to_substract
9-
cat(paste0("Snapshot day for PPM moved to ", ensured_weekday))
109
updated_url <- gsub("[0-9]{4}-[0-9]{2}-[0-9]{2}$", ensured_weekday, rspm_url)
1110
lockfile$R$Repositories$RSPM <- updated_url
1211
renv::lockfile_write(lockfile = lockfile)
12+
cat(paste0("Snapshot day for PPM moved to ", ensured_weekday))

0 commit comments

Comments
 (0)