Skip to content

More logging #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-fans-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'build-uploader': patch
---

Better logging with file information
14 changes: 14 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ export async function run(): Promise<string> {
: null;
const macGameName = macosBuildPath ? extractGameName(macosBuildPath) : null;

if (windowsBuildPath) {
core.info(`Upload Windows build: ${windowsBuildPath}`);
core.info(`Windows game name: ${windowsGameName}`);
core.info(`Windows file bytes: ${windowsStats ? windowsStats.size : 0}`);
core.info(`Windows chunk total: ${windowsChunkTotal}`);
}

if (macosBuildPath) {
core.info(`Upload macOS build: ${macosBuildPath}`);
core.info(`macOS game name: ${macGameName}`);
core.info(`macOS file bytes: ${macStats ? macStats.size : 0}`);
core.info(`macOS chunk total: ${macChunkTotal}`);
}

const buildId = await createBuild({
apiKey,
apiBaseUrl,
Expand Down
1 change: 0 additions & 1 deletion src/uploadBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export async function uploadBuild({
const fileHandle = await fs.open(filePath);
const stats = await fileHandle.stat();
const totalChunks = Math.ceil(stats.size / CHUNK_SIZE);
core.info(`File size: ${stats.size} bytes, Total chunks: ${totalChunks}`);

for (let i = 0; i < totalChunks; i++) {
try {
Expand Down
Loading