Skip to content

Commit d7d8283

Browse files
Test for updated doc. on latest/ranges/-rc
1 parent 75edbb8 commit d7d8283

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ end up being parsed as `23`, which is not equivalent.
5555

5656
For pre-release versions, such as `v1.11.0-rc.0`, use the full version
5757
specifier (`v1.11.0-rc.0`) and set option `version-type` to `strict`. Pre-release versions are
58-
opt-in, so `1.11.x` will not match a pre-release.
58+
opt-in (unless you're using `latest`), so `1.11.x` will not match a pre-release.
5959

6060
#### "Latest" versions
6161

62-
Set a tool's version to `latest` to retrieve the latest version of a given tool.
62+
Set a tool's version to `latest` to retrieve the latest version of a given tool; this includes
63+
release candidates. If you want to exclude release candidates use a range such as `> 0`.
6364
The latest version is (locally) calculated by the action based on the (retrieved) versions
6465
it knows (**note**: it is not the same as [GitHub considers it](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)
6566
and some repositories might propose).

test/setup-beam.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,12 @@ describe('.getVersionFromSpec(_)', () => {
885885
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])
886886
assert.deepStrictEqual(got, expected)
887887

888+
// range > 26 excludes -rc1, -rc2, and -rc3
889+
spec = '> 26'
890+
expected = 'OTP-26.0'
891+
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])
892+
assert.deepStrictEqual(got, expected)
893+
888894
spec = 'latest'
889895
expected = '27.0-rc3'
890896
got = setupBeam.getVersionFromSpec(spec, matrix.otp.windows)

0 commit comments

Comments
 (0)