Skip to content

Commit 5716993

Browse files
committed
allow-prelease-opam -> allow-prerelease-opam
Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent 118359a commit 5716993

File tree

7 files changed

+24
-20
lines changed

7 files changed

+24
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to
88

99
## [unreleased]
1010

11+
### Fixed
12+
13+
- Fix a typo in the key of `allow-prerelease-opam` input.
14+
1115
## [2.1.3]
1216

1317
### Changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ branding:
55
icon: package
66
color: orange
77
inputs:
8-
allow-prelease-opam:
8+
allow-prerelease-opam:
99
description: Allow to use a pre-release version of opam.
1010
required: false
1111
default: "false"

dist/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export const CYGWIN_ROOT_BIN = path.join(CYGWIN_ROOT, "bin");
4242
export const CYGWIN_ROOT_WRAPPERBIN = path.join(CYGWIN_ROOT, "wrapperbin");
4343

4444
// [todo] remove the branch for Windows once opam 2.2 is released as stable.
45-
export const ALLOW_PRELEASE_OPAM =
45+
export const ALLOW_PRERELEASE_OPAM =
4646
PLATFORM !== "win32" &&
47-
core.getBooleanInput("allow-prelease-opam", {
47+
core.getBooleanInput("allow-prerelease-opam", {
4848
required: false,
4949
trimWhitespace: true,
5050
});
@@ -71,7 +71,7 @@ export const OCAML_COMPILER = core.getInput("ocaml-compiler", {
7171

7272
// [todo] remove this once opam 2.2 is released as stable.
7373
export const OPAM_DEPEXT =
74-
!ALLOW_PRELEASE_OPAM &&
74+
!ALLOW_PRERELEASE_OPAM &&
7575
core.getBooleanInput("opam-depext", {
7676
required: false,
7777
trimWhitespace: true,

packages/setup-ocaml/src/installer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
saveOpamCache,
1414
} from "./cache.js";
1515
import {
16-
ALLOW_PRELEASE_OPAM,
16+
ALLOW_PRERELEASE_OPAM,
1717
DUNE_CACHE,
1818
OCAML_COMPILER,
1919
OPAM_DEPEXT,
@@ -35,7 +35,7 @@ import { updateUnixPackageIndexFiles } from "./system.js";
3535
import { resolveCompiler } from "./version.js";
3636

3737
export async function installer() {
38-
if (!ALLOW_PRELEASE_OPAM) {
38+
if (!ALLOW_PRERELEASE_OPAM) {
3939
// [todo] remove this once opam 2.2 is released as stable.
4040
// https://github.com/ocaml/setup-ocaml/issues/299
4141
core.exportVariable("OPAMCLI", "2.0");

packages/setup-ocaml/src/opam.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as semver from "semver";
1212

1313
import { saveCygwinCache } from "./cache.js";
1414
import {
15-
ALLOW_PRELEASE_OPAM,
15+
ALLOW_PRERELEASE_OPAM,
1616
ARCHITECTURE,
1717
CYGWIN_ROOT,
1818
CYGWIN_ROOT_BIN,
@@ -28,7 +28,7 @@ import {
2828
import { getCygwinVersion } from "./win32.js";
2929

3030
export async function getLatestOpamRelease() {
31-
const semverRange = ALLOW_PRELEASE_OPAM ? "*" : "<2.2.0";
31+
const semverRange = ALLOW_PRERELEASE_OPAM ? "*" : "<2.2.0";
3232
const octokit = github.getOctokit(GITHUB_TOKEN);
3333
const { data: releases } = await octokit.rest.repos.listReleases({
3434
owner: "ocaml",
@@ -37,7 +37,7 @@ export async function getLatestOpamRelease() {
3737
const matchedReleases = releases
3838
.filter((release) =>
3939
semver.satisfies(release.tag_name, semverRange, {
40-
includePrerelease: ALLOW_PRELEASE_OPAM,
40+
includePrerelease: ALLOW_PRERELEASE_OPAM,
4141
loose: true,
4242
}),
4343
)

0 commit comments

Comments
 (0)