Skip to content

Commit 1edb525

Browse files
authored
Add more debug logs (#297)
1 parent a4fbf7b commit 1edb525

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

dist/setup/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/download/download-version.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function resolveVersion(
7878
versionInput: string,
7979
githubToken: string,
8080
): Promise<string> {
81+
core.debug(`Resolving version: ${versionInput}`);
8182
const version =
8283
versionInput === "latest"
8384
? await getLatestVersion(githubToken)
@@ -87,6 +88,7 @@ export async function resolveVersion(
8788
return version;
8889
}
8990
const availableVersions = await getAvailableVersions(githubToken);
91+
core.debug(`Available versions: ${availableVersions}`);
9092
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
9193
if (resolvedVersion === "") {
9294
throw new Error(`No version found for ${version}`);
@@ -123,6 +125,7 @@ async function getReleaseTagNames(
123125
}
124126

125127
async function getLatestVersion(githubToken: string) {
128+
core.debug("Getting latest version...");
126129
const octokit = new PaginatingOctokit({
127130
auth: githubToken,
128131
});
@@ -145,6 +148,7 @@ async function getLatestVersion(githubToken: string) {
145148
if (!latestRelease) {
146149
throw new Error("Could not determine latest release.");
147150
}
151+
core.debug(`Latest version: ${latestRelease.tag_name}`);
148152
return latestRelease.tag_name;
149153
}
150154

src/utils/pyproject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as toml from "smol-toml";
55
export function getUvVersionFromConfigFile(
66
filePath: string,
77
): string | undefined {
8+
core.debug(`Trying to find required-version for uv in: ${filePath}`);
89
if (!fs.existsSync(filePath)) {
910
core.warning(`Could not find file: ${filePath}`);
1011
return undefined;

0 commit comments

Comments
 (0)