diff --git a/repo2docker/buildpacks/r.py b/repo2docker/buildpacks/r.py index 41a1765c..4dcbbb10 100644 --- a/repo2docker/buildpacks/r.py +++ b/repo2docker/buildpacks/r.py @@ -63,8 +63,9 @@ class RBuildPack(PythonBuildPack): Will return the version specified by the user or the current default version. """ + # Available versions at https://cran.r-project.org/src/base/ version_map = { - "4.2": "4.2.0", + "4.2": "4.2.1", "4.1": "4.1.3", "4.0": "4.0.5", "3.6": "3.6.3", @@ -75,6 +76,11 @@ class RBuildPack(PythonBuildPack): # the default if nothing is specified # Use full version is needed here, so it a valid semver + # + # NOTE: When updating this version, also update + # - tests/unit/test_r.py -> test_version_specification + # - tests/r/simple/verify + # r_version = version_map["4.2"] if not hasattr(self, "_r_version"): diff --git a/tests/unit/test_r.py b/tests/unit/test_r.py index 6298914b..f13ee739 100644 --- a/tests/unit/test_r.py +++ b/tests/unit/test_r.py @@ -8,7 +8,7 @@ from repo2docker import buildpacks @pytest.mark.parametrize( - "runtime_version, expected", [("", "4.1"), ("3.6", "3.6"), ("3.5.1", "3.5")] + "runtime_version, expected", [("", "4.2"), ("3.6", "3.6"), ("3.5.1", "3.5")] ) def test_version_specification(tmpdir, runtime_version, expected): tmpdir.chdir()