Skip to content

Commit 478cd58

Browse files
committed
Fix
1 parent 5c2f203 commit 478cd58

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

dist/main.js

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

src/graalvm.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {
88
getContents,
99
getLatestRelease,
1010
getMatchingTags,
11-
getTaggedRelease,
12-
getLastTags
11+
getTaggedRelease
1312
} from './utils.js'
1413
import {
1514
downloadGraalVMViaGDS,
@@ -83,11 +82,13 @@ async function getGraalVMCEGitHubRelease(graalVMVersion: string): Promise<c.Late
8382
}
8483

8584
async function findReleaseTagUrl(graalVMVersion: string) {
86-
const lastTags = await getLastTags(c.GRAALVM_GH_USER, c.GRAALVM_RELEASES_REPO)
87-
for (const tag of lastTags) {
88-
if (tag.name.includes(graalVMVersion)) {
89-
return tag.name
90-
}
85+
const matchingRefs = await getMatchingTags(
86+
c.GRAALVM_GH_USER,
87+
c.GRAALVM_RELEASES_REPO,
88+
GRAALVM_GRAAL_TAG_PREFIX + graalVMVersion
89+
)
90+
for (const matchingRef of matchingRefs) {
91+
return matchingRef.ref.substring(`refs/tags/${GRAALVM_GRAAL_TAG_PREFIX}`.length)
9192
}
9293
throw new Error(`Could not find GraalVM CE release tag. Are you sure version: '${graalVMVersion}' is correct?`)
9394
}

0 commit comments

Comments
 (0)