[GooglePlayPromote] Fix task not failing when versionCode is not valid (#266)
* fix task not failing when versionCode is not valid * bump task version * fix task not stopping after failing check
This commit is contained in:
Родитель
926147cd83
Коммит
dc93480a9f
|
@ -27,6 +27,7 @@
|
|||
"loc.messages.EndpointNotFound": "The service connection could not be found.",
|
||||
"loc.messages.Authenticating": "Authenticating with Google Play",
|
||||
"loc.messages.GetTrackInfo": "Getting information for track %s",
|
||||
"loc.messages.InvalidVersionCode": "Version code should be a positive integer",
|
||||
"loc.messages.PromoteTrack": "Promoting to track %s",
|
||||
"loc.messages.CleanTrack": "Cleaning up track %s",
|
||||
"loc.messages.PromoteSucceed": "APK successfully promoted!",
|
||||
|
|
|
@ -58,7 +58,13 @@ async function run() {
|
|||
let releaseNotes = track.releases[0].releaseNotes;
|
||||
|
||||
if (versionCode !== undefined) {
|
||||
versionNumber = [Number(versionCode)];
|
||||
const versionCodeNumber = Number(versionCode);
|
||||
|
||||
if (!Number.isInteger(versionCodeNumber) || versionCodeNumber <= 0) {
|
||||
throw new Error(tl.loc('InvalidVersionCode'));
|
||||
}
|
||||
|
||||
versionNumber = [versionCodeNumber];
|
||||
// don't override the release notes with latest release notes, potentially dangerous
|
||||
releaseNotes = undefined;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"version": {
|
||||
"Major": "3",
|
||||
"Minor": "186",
|
||||
"Patch": "1"
|
||||
"Patch": "2"
|
||||
},
|
||||
"minimumAgentVersion": "2.182.1",
|
||||
"instanceNameFormat": "Promote $(packageName) from $(sourceTrack) to $(destinationTrack)",
|
||||
|
@ -145,6 +145,7 @@
|
|||
"EndpointNotFound": "The service connection could not be found.",
|
||||
"Authenticating": "Authenticating with Google Play",
|
||||
"GetTrackInfo": "Getting information for track %s",
|
||||
"InvalidVersionCode": "Version code should be a positive integer",
|
||||
"PromoteTrack": "Promoting to track %s",
|
||||
"CleanTrack": "Cleaning up track %s",
|
||||
"PromoteSucceed": "APK successfully promoted!",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"version": {
|
||||
"Major": "3",
|
||||
"Minor": "186",
|
||||
"Patch": "1"
|
||||
"Patch": "2"
|
||||
},
|
||||
"minimumAgentVersion": "2.182.1",
|
||||
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
|
||||
|
@ -145,6 +145,7 @@
|
|||
"EndpointNotFound": "ms-resource:loc.messages.EndpointNotFound",
|
||||
"Authenticating": "ms-resource:loc.messages.Authenticating",
|
||||
"GetTrackInfo": "ms-resource:loc.messages.GetTrackInfo",
|
||||
"InvalidVersionCode": "ms-resource:loc.messages.InvalidVersionCode",
|
||||
"PromoteTrack": "ms-resource:loc.messages.PromoteTrack",
|
||||
"CleanTrack": "ms-resource:loc.messages.CleanTrack",
|
||||
"PromoteSucceed": "ms-resource:loc.messages.PromoteSucceed",
|
||||
|
|
Загрузка…
Ссылка в новой задаче