From c4b81dc3e7daf6768ce106d2cd1c05ea1546bb65 Mon Sep 17 00:00:00 2001 From: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:09:10 +0530 Subject: [PATCH] intial commit --- dist/setup/index.js | 12 ++++++++++-- src/install-python.ts | 13 ++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 126f4a3..3b82124 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -91637,8 +91637,10 @@ function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) { return __awaiter(this, void 0, void 0, function* () { if (!manifest) { manifest = yield getManifest(); + core.debug('manifest :>> ' + JSON.stringify(manifest)); } const foundRelease = yield tc.findFromManifest(semanticVersionSpec, false, manifest, architecture); + core.debug(`Found release: ${JSON.stringify(foundRelease)}`); return foundRelease; }); } @@ -91646,7 +91648,10 @@ exports.findReleaseFromManifest = findReleaseFromManifest; function getManifest() { return __awaiter(this, void 0, void 0, function* () { try { - return yield getManifestFromRepo(); + const manifestFromRepo = yield getManifestFromRepo(); + core.debug('Successfully fetched the manifest from the repo.'); + core.debug(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`); + return manifestFromRepo; } catch (err) { core.debug('Fetching the manifest via the API failed.'); @@ -91654,7 +91659,10 @@ function getManifest() { core.debug(err.message); } } - return yield getManifestFromURL(); + const manifestFromURL = yield getManifestFromURL(); + core.debug('Successfully fetched the manifest from the URL.'); + core.debug(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`); + return manifestFromURL; }); } exports.getManifest = getManifest; diff --git a/src/install-python.ts b/src/install-python.ts index d3421bf..550ae28 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -20,6 +20,7 @@ export async function findReleaseFromManifest( ): Promise { if (!manifest) { manifest = await getManifest(); + core.debug('manifest :>> ' + JSON.stringify(manifest)); } const foundRelease = await tc.findFromManifest( @@ -28,20 +29,26 @@ export async function findReleaseFromManifest( manifest, architecture ); - + core.debug(`Found release: ${JSON.stringify(foundRelease)}`); return foundRelease; } export async function getManifest(): Promise { try { - return await getManifestFromRepo(); + const manifestFromRepo = await getManifestFromRepo(); + core.debug('Successfully fetched the manifest from the repo.'); + core.debug(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`); + return manifestFromRepo; } catch (err) { core.debug('Fetching the manifest via the API failed.'); if (err instanceof Error) { core.debug(err.message); } } - return await getManifestFromURL(); + const manifestFromURL = await getManifestFromURL(); + core.debug('Successfully fetched the manifest from the URL.'); + core.debug(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`); + return manifestFromURL; } export function getManifestFromRepo(): Promise {