From f5c3d22549cfd7fa238d50efdf9851ef272fe814 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Fri, 23 Oct 2020 15:20:16 +1300 Subject: [PATCH] Add some extra log output --- lib/edits.js | 3 +++ src/edits.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/edits.js b/lib/edits.js index 1b9c72c3..170b72c8 100644 --- a/lib/edits.js +++ b/lib/edits.js @@ -44,6 +44,7 @@ function uploadToPlayStore(options, releaseFiles) { releaseFiles.forEach((releaseFile) => __awaiter(this, void 0, void 0, function* () { core.debug(`Uploading ${releaseFile}`); yield uploadRelease(appEdit.data, options, releaseFile).catch(reason => { + core.setFailed(reason); return Promise.reject(reason); }); })); @@ -70,10 +71,12 @@ function uploadRelease(appEdit, options, releaseFile) { core.debug("Track is Internal app sharing, switch to special upload api"); if (releaseFile.endsWith('.apk')) { const res = yield internalSharingUploadApk(options, releaseFile); + console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`); return Promise.resolve(res.downloadUrl); } else if (releaseFile.endsWith('.aab')) { const res = yield internalSharingUploadBundle(options, releaseFile); + console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`); return Promise.resolve(res.downloadUrl); } else { diff --git a/src/edits.ts b/src/edits.ts index 643e94ca..b1760192 100644 --- a/src/edits.ts +++ b/src/edits.ts @@ -36,6 +36,7 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri releaseFiles.forEach(async releaseFile => { core.debug(`Uploading ${releaseFile}`) await uploadRelease(appEdit.data, options, releaseFile).catch(reason => { + core.setFailed(reason) return Promise.reject(reason) }) }) @@ -61,9 +62,11 @@ async function uploadRelease(appEdit: AppEdit, options: EditOptions, releaseFile core.debug("Track is Internal app sharing, switch to special upload api") if (releaseFile.endsWith('.apk')) { const res = await internalSharingUploadApk(options, releaseFile) + console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`) return Promise.resolve(res.downloadUrl) } else if (releaseFile.endsWith('.aab')) { const res = await internalSharingUploadBundle(options, releaseFile) + console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`) return Promise.resolve(res.downloadUrl) } else { core.setFailed(`${releaseFile} is invalid`)