Compare commits

...

2 Commits

Author SHA1 Message Date
Sergey Dolin
90ce860b81 Merge 6ecdea2b64 into c4c1141886 2025-03-11 11:18:40 -05:00
Sergey Dolin
6ecdea2b64 Add .tool-versions support 2023-07-27 19:39:31 +02:00
2 changed files with 7 additions and 0 deletions

4
dist/setup/index.js vendored
View File

@@ -93478,6 +93478,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();
}
exports.parseGoVersionFile = parseGoVersionFile;

View File

@@ -466,6 +466,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();