mirror of
https://github.com/actions/setup-go.git
synced 2026-03-01 18:54:47 +08:00
Compare commits
2 Commits
v6.2.0
...
a902bbd9b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a902bbd9b2 | ||
|
|
6ecdea2b64 |
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
@@ -93609,6 +93609,10 @@ function parseGoVersionFile(versionFilePath) {
|
|||||||
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
||||||
return match ? match[1] : '';
|
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();
|
return contents.trim();
|
||||||
}
|
}
|
||||||
exports.parseGoVersionFile = parseGoVersionFile;
|
exports.parseGoVersionFile = parseGoVersionFile;
|
||||||
|
|||||||
@@ -462,6 +462,9 @@ export function parseGoVersionFile(versionFilePath: string): string {
|
|||||||
) {
|
) {
|
||||||
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
const match = contents.match(/^go (\d+(\.\d+)*)/m);
|
||||||
return match ? match[1] : '';
|
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();
|
return contents.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user