mirror of
https://github.com/actions/setup-go.git
synced 2026-02-04 22:48:21 +00:00
Merge 90e09cb0fc into a5f9b05d2d
This commit is contained in:
commit
9953bf1737
4 changed files with 228 additions and 6 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
|
@ -49856,7 +49856,8 @@ function findMatch(versionSpec_1) {
|
|||
const candidate = candidates[i];
|
||||
const version = makeSemver(candidate.version);
|
||||
core.debug(`check ${version} satisfies ${versionSpec}`);
|
||||
if (semver.satisfies(version, versionSpec)) {
|
||||
if (candidate.version.replace(/^go/, '') === versionSpec ||
|
||||
semver.satisfies(version, versionSpec)) {
|
||||
goFile = candidate.files.find(file => {
|
||||
core.debug(`${file.arch}===${archFilter} && ${file.os}===${platFilter}`);
|
||||
return file.arch === archFilter && file.os === platFilter;
|
||||
|
|
@ -49924,7 +49925,7 @@ function parseGoVersionFile(versionFilePath) {
|
|||
}
|
||||
}
|
||||
// go directive: https://go.dev/ref/mod#go-mod-file-go
|
||||
const matchGo = contents.match(/^go (\d+(\.\d+)*)/m);
|
||||
const matchGo = contents.match(/^go (\d+(\.\d+)*(?:\.\d+|(beta|rc)\d+)?)/m);
|
||||
return matchGo ? matchGo[1] : '';
|
||||
}
|
||||
else if (path.basename(versionFilePath) === '.tool-versions') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue