Skip to content

Commit

Permalink
Unlock opam 2.2.0 pre-release
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Jun 29, 2023
1 parent 92f6225 commit b5cd8ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/setup-ocaml/src/opam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
import { getCygwinVersion } from "./win32";

async function getLatestOpamRelease() {
const semverRange = "<2.2.0";
const semverRange = "<2.3.0";
const octokit = github.getOctokit(GITHUB_TOKEN);
const { data: releases } = await octokit.rest.repos.listReleases({
owner: "ocaml",
Expand All @@ -37,7 +37,10 @@ async function getLatestOpamRelease() {
});
const matchedReleases = releases
.filter((release) =>
semver.satisfies(release.tag_name, semverRange, { loose: true })
semver.satisfies(release.tag_name, semverRange, {
includePrerelease: true,
loose: true,
})
)
.sort(({ tag_name: v1 }, { tag_name: v2 }) =>
semver.rcompare(v1, v2, { loose: true })
Expand Down

0 comments on commit b5cd8ad

Please sign in to comment.