From f1e56b7bef04f64fe9255e05396e22c426501e3f Mon Sep 17 00:00:00 2001 From: Kate Date: Fri, 17 May 2024 14:52:19 +0100 Subject: [PATCH] Use opam 2.2 everywhere --- packages/setup-ocaml/src/cache.ts | 3 +-- packages/setup-ocaml/src/opam.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 765c56c7..a54588d7 100644 --- a/packages/setup-ocaml/src/opam.ts +++ b/packages/setup-ocaml/src/opam.ts @@ -27,7 +27,7 @@ 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({