Skip to content

Commit

Permalink
Add more debug logs (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger authored Feb 21, 2025
1 parent a4fbf7b commit 1edb525
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/setup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/download/download-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function resolveVersion(
versionInput: string,
githubToken: string,
): Promise<string> {
core.debug(`Resolving version: ${versionInput}`);
const version =
versionInput === "latest"
? await getLatestVersion(githubToken)
Expand All @@ -87,6 +88,7 @@ export async function resolveVersion(
return version;
}
const availableVersions = await getAvailableVersions(githubToken);
core.debug(`Available versions: ${availableVersions}`);
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
if (resolvedVersion === "") {
throw new Error(`No version found for ${version}`);
Expand Down Expand Up @@ -123,6 +125,7 @@ async function getReleaseTagNames(
}

async function getLatestVersion(githubToken: string) {
core.debug("Getting latest version...");
const octokit = new PaginatingOctokit({
auth: githubToken,
});
Expand All @@ -145,6 +148,7 @@ async function getLatestVersion(githubToken: string) {
if (!latestRelease) {
throw new Error("Could not determine latest release.");
}
core.debug(`Latest version: ${latestRelease.tag_name}`);
return latestRelease.tag_name;
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/pyproject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as toml from "smol-toml";
export function getUvVersionFromConfigFile(
filePath: string,
): string | undefined {
core.debug(`Trying to find required-version for uv in: ${filePath}`);
if (!fs.existsSync(filePath)) {
core.warning(`Could not find file: ${filePath}`);
return undefined;
Expand Down

0 comments on commit 1edb525

Please sign in to comment.