Add some extra log output

This commit is contained in:
Jack Boswell (boswelja)
2020-10-23 15:20:16 +13:00
parent fb873d403d
commit f5c3d22549
2 changed files with 6 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ function uploadToPlayStore(options, releaseFiles) {
releaseFiles.forEach((releaseFile) => __awaiter(this, void 0, void 0, function* () { releaseFiles.forEach((releaseFile) => __awaiter(this, void 0, void 0, function* () {
core.debug(`Uploading ${releaseFile}`); core.debug(`Uploading ${releaseFile}`);
yield uploadRelease(appEdit.data, options, releaseFile).catch(reason => { yield uploadRelease(appEdit.data, options, releaseFile).catch(reason => {
core.setFailed(reason);
return Promise.reject(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"); core.debug("Track is Internal app sharing, switch to special upload api");
if (releaseFile.endsWith('.apk')) { if (releaseFile.endsWith('.apk')) {
const res = yield internalSharingUploadApk(options, releaseFile); const res = yield internalSharingUploadApk(options, releaseFile);
console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`);
return Promise.resolve(res.downloadUrl); return Promise.resolve(res.downloadUrl);
} }
else if (releaseFile.endsWith('.aab')) { else if (releaseFile.endsWith('.aab')) {
const res = yield internalSharingUploadBundle(options, releaseFile); const res = yield internalSharingUploadBundle(options, releaseFile);
console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`);
return Promise.resolve(res.downloadUrl); return Promise.resolve(res.downloadUrl);
} }
else { else {

View File

@@ -36,6 +36,7 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri
releaseFiles.forEach(async releaseFile => { releaseFiles.forEach(async releaseFile => {
core.debug(`Uploading ${releaseFile}`) core.debug(`Uploading ${releaseFile}`)
await uploadRelease(appEdit.data, options, releaseFile).catch(reason => { await uploadRelease(appEdit.data, options, releaseFile).catch(reason => {
core.setFailed(reason)
return Promise.reject(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") core.debug("Track is Internal app sharing, switch to special upload api")
if (releaseFile.endsWith('.apk')) { if (releaseFile.endsWith('.apk')) {
const res = await internalSharingUploadApk(options, releaseFile) const res = await internalSharingUploadApk(options, releaseFile)
console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`)
return Promise.resolve(res.downloadUrl) return Promise.resolve(res.downloadUrl)
} else if (releaseFile.endsWith('.aab')) { } else if (releaseFile.endsWith('.aab')) {
const res = await internalSharingUploadBundle(options, releaseFile) const res = await internalSharingUploadBundle(options, releaseFile)
console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`)
return Promise.resolve(res.downloadUrl) return Promise.resolve(res.downloadUrl)
} else { } else {
core.setFailed(`${releaseFile} is invalid`) core.setFailed(`${releaseFile} is invalid`)