diff --git a/packages/setup-ocaml/src/cache.ts b/packages/setup-ocaml/src/cache.ts index fcb01125..f5811a6d 100644 --- a/packages/setup-ocaml/src/cache.ts +++ b/packages/setup-ocaml/src/cache.ts @@ -65,8 +65,7 @@ async function composeOpamCacheKeys() { PLATFORM === "win32" ? PLATFORM : `${PLATFORM}-${(await getSystemIdentificationInfo()).version}`; - const opamVersion = - PLATFORM === "win32" ? "0.0.0.2" : (await getLatestOpamRelease()).version; + const opamVersion = (await getLatestOpamRelease()).version; const ocamlCompiler = await resolveCompiler(OCAML_COMPILER); const ocamlVersion = ocamlCompiler.toLowerCase().replaceAll(/\W/g, "_"); const sandboxed = OPAM_DISABLE_SANDBOXING ? "nosandbox" : "sandbox"; diff --git a/packages/setup-ocaml/src/opam.ts b/packages/setup-ocaml/src/opam.ts index a55df26d..17b373a8 100644 --- a/packages/setup-ocaml/src/opam.ts +++ b/packages/setup-ocaml/src/opam.ts @@ -28,7 +28,10 @@ import { import { getCygwinVersion } from "./win32.js"; export async function getLatestOpamRelease() { - const semverRange = ALLOW_PRERELEASE_OPAM ? "*" : "<2.2.0"; + const semverRange = + ALLOW_PRERELEASE_OPAM + ? "*" + : "<2.3.0"; const octokit = github.getOctokit(GITHUB_TOKEN); const opam_platform = PLATFORM === "win32" ? "windows" : PLATFORM; const { data: releases } = await octokit.rest.repos.listReleases({