Skip to content

Commit

Permalink
Merge pull request #1403 from minrk/r-triplets
Browse files Browse the repository at this point in the history
add triplets for r versions 4.3, 4.4
  • Loading branch information
yuvipanda authored Feb 20, 2025
2 parents 80d186a + a6e9ddf commit 1ad76bc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions repo2docker/buildpacks/r.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def r_version(self):
"""
# Available versions at https://cran.r-project.org/src/base/
version_map = {
"4.4": "4.4.1",
"4.3": "4.3.3",
"4.2": "4.2.1",
"4.1": "4.1.3",
"4.0": "4.0.5",
Expand Down Expand Up @@ -97,6 +99,9 @@ def r_version(self):
# available. Users can however explicitly specify the full version to get something specific
if r_version in version_map:
r_version = version_map[r_version]
elif len(r_version.split(".")) == 2:
# must have x.y.z version, add .0 for unrecognized (future) R versions
r_version += ".0"

# translate to the full version string
self._r_version = r_version
Expand Down
1 change: 0 additions & 1 deletion tests/r/r4.0-rspm/runtime.txt

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions tests/r/r4.4-rspm/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
r-4.4-2025-01-01
2 changes: 1 addition & 1 deletion tests/r/r4.0-rspm/verify → tests/r/r4.4-rspm/verify
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ library('digest')

# Fail if version is not 4.0
print(version)
if (!(version$major == "4" && as.double(version$minor) >= 0 && as.double(version$minor) < 1)) {
if (!(version$major == "4" && as.double(version$minor) >= 4 && as.double(version$minor) < 5)) {
quit("yes", 1)
}

Expand Down

0 comments on commit 1ad76bc

Please sign in to comment.