mirror of
https://github.com/actions/setup-go.git
synced 2025-07-15 03:25:15 -06:00
Merge 6ecdea2b64
into 7c0b336c9a
This commit is contained in:
commit
f3d81c1984
2 changed files with 7 additions and 0 deletions
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
@ -93596,6 +93596,10 @@ function parseGoVersionFile(versionFilePath) {
|
|||
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
||||
return match ? match[1] : '';
|
||||
}
|
||||
else if (path.basename(versionFilePath) === '.tool-versions') {
|
||||
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
|
||||
return match ? match[1] : '';
|
||||
}
|
||||
return contents.trim();
|
||||
}
|
||||
function resolveStableVersionDist(versionSpec, arch) {
|
||||
|
|
|
@ -497,6 +497,9 @@ export function parseGoVersionFile(versionFilePath: string): string {
|
|||
) {
|
||||
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
||||
return match ? match[1] : '';
|
||||
} else if (path.basename(versionFilePath) === '.tool-versions') {
|
||||
const match = contents.match(/^golang\s+(\d+(\.\d+)*)/m);
|
||||
return match ? match[1] : '';
|
||||
}
|
||||
|
||||
return contents.trim();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue