Skip to content

Commit

Permalink
Use opam 2.2 everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed May 17, 2024
1 parent 37f35ed commit 04990cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/setup-ocaml/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
5 changes: 4 additions & 1 deletion packages/setup-ocaml/src/opam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 04990cd

Please sign in to comment.