From d2ed26efd5b802094973cbe68aeada9ce70224d0 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Thu, 5 Nov 2020 11:47:39 +1300 Subject: [PATCH] Build latest changes Forgot to do this before --- lib/edits.js | 10 +++++----- src/edits.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/edits.js b/lib/edits.js index 736b20e4..7a36c7fd 100644 --- a/lib/edits.js +++ b/lib/edits.js @@ -40,13 +40,13 @@ function uploadToPlayStore(options, releaseFiles) { // Check the 'track' for 'internalsharing', if so switch to a non-track api if (options.track === 'internalsharing') { core.debug("Track is Internal app sharing, switch to special upload api"); - releaseFiles.forEach((releaseFile) => __awaiter(this, void 0, void 0, function* () { + for (const releaseFile in releaseFiles) { core.debug(`Uploading ${releaseFile}`); yield uploadInternalSharingRelease(options, releaseFile).catch(reason => { core.setFailed(reason); return Promise.reject(reason); }); - })); + } } else { // Create a new Edit @@ -61,16 +61,16 @@ function uploadToPlayStore(options, releaseFiles) { }); // Upload artifacts to Google Play, and store their version codes var versionCodes = new Array(); - releaseFiles.forEach((releaseFile) => __awaiter(this, void 0, void 0, function* () { + for (const releaseFile in releaseFiles) { core.debug(`Uploading ${releaseFile}`); const versionCode = yield uploadRelease(appEdit.data, options, releaseFile).catch(reason => { core.setFailed(reason); return Promise.reject(reason); }); versionCodes.push(versionCode); - })); + } // Add the uploaded artifacts to the Edit track - const track = addReleasesToTrack(appEdit.data, options, versionCodes); + const track = yield addReleasesToTrack(appEdit.data, options, versionCodes); // Commit the pending Edit const res = yield androidPublisher.edits.commit({ auth: options.auth, diff --git a/src/edits.ts b/src/edits.ts index 58406e5c..e652d297 100644 --- a/src/edits.ts +++ b/src/edits.ts @@ -44,13 +44,13 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri auth: options.auth, packageName: options.applicationId }); - + // Validate the given track await validateSelectedTrack(appEdit.data, options).catch(reason => { core.setFailed(reason); return Promise.reject(reason); }); - + // Upload artifacts to Google Play, and store their version codes var versionCodes = new Array(); for (const releaseFile in releaseFiles) { @@ -61,7 +61,7 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri }); versionCodes.push(versionCode!); } - + // Add the uploaded artifacts to the Edit track const track = await addReleasesToTrack(appEdit.data, options, versionCodes); @@ -71,7 +71,7 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri editId: appEdit.data.id!, packageName: options.applicationId }); - + // Simple check to see whether commit was successful if (res.data.id != null) { core.debug(`Successfully committed ${res.data.id}`);