mirror of
https://code.forgejo.org/actions/setup-go
synced 2025-06-27 20:28:03 +02:00
Remove unnecessary fetching of manifest
This commit is contained in:
parent
e4eab8e9e9
commit
2a148a10b5
2 changed files with 5 additions and 21 deletions
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
|
@ -63234,7 +63234,7 @@ function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|||
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
||||
versionSpec === utils_1.StableReleaseAlias.OldStable) {
|
||||
manifest = yield getManifest(auth);
|
||||
versionSpec = yield resolveStableVersionInput(versionSpec, auth, arch, manifest);
|
||||
versionSpec = yield resolveStableVersionInput(versionSpec, arch, manifest);
|
||||
}
|
||||
if (checkLatest) {
|
||||
core.info('Attempting to resolve the latest version from the manifest...');
|
||||
|
@ -63405,7 +63405,7 @@ function findMatch(versionSpec, arch = os_1.default.arch()) {
|
|||
const fixedCandidates = candidates.map(item => {
|
||||
return Object.assign(Object.assign({}, item), { version: makeSemver(item.version) });
|
||||
});
|
||||
versionSpec = yield resolveStableVersionInput(versionSpec, undefined, archFilter, fixedCandidates);
|
||||
versionSpec = yield resolveStableVersionInput(versionSpec, archFilter, fixedCandidates);
|
||||
}
|
||||
let goFile;
|
||||
for (let i = 0; i < candidates.length; i++) {
|
||||
|
@ -63479,13 +63479,9 @@ function parseGoVersionFile(versionFilePath) {
|
|||
return contents.trim();
|
||||
}
|
||||
exports.parseGoVersionFile = parseGoVersionFile;
|
||||
function resolveStableVersionInput(versionSpec, auth, arch = os_1.default.arch(), manifest) {
|
||||
function resolveStableVersionInput(versionSpec, arch = os_1.default.arch(), manifest) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!manifest) {
|
||||
core.debug('No manifest cached');
|
||||
manifest = yield getManifest(auth);
|
||||
}
|
||||
const releases = manifest
|
||||
.map(item => {
|
||||
const index = item.files.findIndex(item => item.arch === arch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue