Build latest changes

Forgot to do this before
This commit is contained in:
Jack Boswell (boswelja)
2020-11-05 11:47:39 +13:00
parent a0b5e05df4
commit d2ed26efd5
2 changed files with 9 additions and 9 deletions

View File

@@ -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,

View File

@@ -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<number>();
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}`);