Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit bea2b9c

Browse files
committed
from -> previous
1 parent a808afd commit bea2b9c

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

CodePush.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ function getPromisifiedSdk(requestFetchAdapter, config) {
103103
});
104104
};
105105

106-
sdk.reportStatusDeploy = (deployedPackage, status, fromLabelOrAppVersion, fromDeploymentKey) => {
106+
sdk.reportStatusDeploy = (deployedPackage, status, previousLabelOrAppVersion, previousDeploymentKey) => {
107107
return new Promise((resolve, reject) => {
108-
module.exports.AcquisitionSdk.prototype.reportStatusDeploy.call(sdk, deployedPackage, status, fromLabelOrAppVersion, fromDeploymentKey, (err) => {
108+
module.exports.AcquisitionSdk.prototype.reportStatusDeploy.call(sdk, deployedPackage, status, previousLabelOrAppVersion, previousDeploymentKey, (err) => {
109109
if (err) {
110110
reject(err);
111111
} else {
@@ -140,15 +140,15 @@ async function notifyApplicationReady() {
140140
const statusReport = await NativeCodePush.getNewStatusReport();
141141
if (statusReport) {
142142
const config = await getConfiguration();
143-
const fromLabelOrAppVersion = statusReport.fromLabelOrAppVersion;
144-
const fromDeploymentKey = statusReport.fromDeploymentKey || config.deploymentKey;
143+
const previousLabelOrAppVersion = statusReport.previousLabelOrAppVersion;
144+
const previousDeploymentKey = statusReport.previousDeploymentKey || config.deploymentKey;
145145
if (statusReport.appVersion) {
146146
const sdk = getPromisifiedSdk(requestFetchAdapter, config);
147-
sdk.reportStatusDeploy(/* deployedPackage */ null, /* status */ null, fromLabelOrAppVersion, fromDeploymentKey);
147+
sdk.reportStatusDeploy(/* deployedPackage */ null, /* status */ null, previousLabelOrAppVersion, previousDeploymentKey);
148148
} else {
149149
config.deploymentKey = statusReport.package.deploymentKey;
150150
const sdk = getPromisifiedSdk(requestFetchAdapter, config);
151-
sdk.reportStatusDeploy(statusReport.package, statusReport.status, fromLabelOrAppVersion, fromDeploymentKey);
151+
sdk.reportStatusDeploy(statusReport.package, statusReport.status, previousLabelOrAppVersion, previousDeploymentKey);
152152
}
153153
}
154154
}

CodePush.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -586,20 +586,20 @@ - (void)savePendingUpdate:(NSString *)packageHash
586586
} else if (![previousStatusReportIdentifier isEqualToString:currentPackageIdentifier]) {
587587
[self recordDeploymentStatusReported:currentPackageIdentifier];
588588
if ([self isStatusReportIdentifierCodePushLabel:previousStatusReportIdentifier]) {
589-
NSString *fromDeploymentKey = [self getDeploymentKeyFromStatusReportIdentifier:previousStatusReportIdentifier];
590-
NSString *fromLabel = [self getVersionLabelFromStatusReportIdentifier:previousStatusReportIdentifier];
589+
NSString *previousDeploymentKey = [self getDeploymentKeyFromStatusReportIdentifier:previousStatusReportIdentifier];
590+
NSString *previousLabel = [self getVersionLabelFromStatusReportIdentifier:previousStatusReportIdentifier];
591591
resolve(@{
592592
@"package": currentPackage,
593593
@"status": DeploymentSucceeded,
594-
@"fromDeploymentKey": fromDeploymentKey,
595-
@"fromLabelOrAppVersion": fromLabel
594+
@"previousDeploymentKey": previousDeploymentKey,
595+
@"previousLabelOrAppVersion": previousLabel
596596
});
597597
} else {
598598
// Previous status report was with a binary app version.
599599
resolve(@{
600600
@"package": currentPackage,
601601
@"status": DeploymentSucceeded,
602-
@"fromLabelOrAppVersion": previousStatusReportIdentifier
602+
@"previousLabelOrAppVersion": previousStatusReportIdentifier
603603
});
604604
}
605605
return;
@@ -617,18 +617,18 @@ - (void)savePendingUpdate:(NSString *)packageHash
617617
} else if (![previousStatusReportIdentifier isEqualToString:appVersion]) {
618618
[self recordDeploymentStatusReported:appVersion];
619619
if ([self isStatusReportIdentifierCodePushLabel:previousStatusReportIdentifier]) {
620-
NSString *fromDeploymentKey = [self getDeploymentKeyFromStatusReportIdentifier:previousStatusReportIdentifier];
621-
NSString *fromLabel = [self getVersionLabelFromStatusReportIdentifier:previousStatusReportIdentifier];
620+
NSString *previousDeploymentKey = [self getDeploymentKeyFromStatusReportIdentifier:previousStatusReportIdentifier];
621+
NSString *previousLabel = [self getVersionLabelFromStatusReportIdentifier:previousStatusReportIdentifier];
622622
resolve(@{
623623
@"appVersion": appVersion,
624-
@"fromDeploymentKey": fromDeploymentKey,
625-
@"fromLabelOrAppVersion": fromLabel
624+
@"previousDeploymentKey": previousDeploymentKey,
625+
@"previousLabelOrAppVersion": previousLabel
626626
});
627627
} else {
628628
// Previous status report was with a binary app version.
629629
resolve(@{
630630
@"appVersion": appVersion,
631-
@"fromLabelOrAppVersion": previousStatusReportIdentifier
631+
@"previousLabelOrAppVersion": previousStatusReportIdentifier
632632
});
633633
}
634634
return;

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -512,20 +512,20 @@ public void getNewStatusReport(Promise promise) {
512512
} else if (!previousStatusReportIdentifier.equals(currentPackageIdentifier)) {
513513
recordDeploymentStatusReported(currentPackageIdentifier);
514514
if (isStatusReportIdentifierCodePushLabel(previousStatusReportIdentifier)) {
515-
String fromDeploymentKey = getDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier);
516-
String fromLabel = getVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier);
515+
String previousDeploymentKey = getDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier);
516+
String previousLabel = getVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier);
517517
WritableNativeMap reportMap = new WritableNativeMap();
518518
reportMap.putMap("package", currentPackage);
519519
reportMap.putString("status", DEPLOYMENT_SUCCEEDED_STATUS);
520-
reportMap.putString("fromDeploymentKey", fromDeploymentKey);
521-
reportMap.putString("fromLabelOrAppVersion", fromLabel);
520+
reportMap.putString("previousDeploymentKey", previousDeploymentKey);
521+
reportMap.putString("previousLabelOrAppVersion", previousLabel);
522522
promise.resolve(reportMap);
523523
} else {
524524
// Previous status report was with a binary app version.
525525
WritableNativeMap reportMap = new WritableNativeMap();
526526
reportMap.putMap("package", currentPackage);
527527
reportMap.putString("status", DEPLOYMENT_SUCCEEDED_STATUS);
528-
reportMap.putString("fromLabelOrAppVersion", previousStatusReportIdentifier);
528+
reportMap.putString("previousLabelOrAppVersion", previousStatusReportIdentifier);
529529
promise.resolve(reportMap);
530530
}
531531
return;
@@ -544,18 +544,18 @@ public void getNewStatusReport(Promise promise) {
544544
} else if (!previousStatusReportIdentifier.equals(appVersion)) {
545545
recordDeploymentStatusReported(appVersion);
546546
if (isStatusReportIdentifierCodePushLabel(previousStatusReportIdentifier)) {
547-
String fromDeploymentKey = getDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier);
548-
String fromLabel = getVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier);
547+
String previousDeploymentKey = getDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier);
548+
String previousLabel = getVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier);
549549
WritableNativeMap reportMap = new WritableNativeMap();
550550
reportMap.putString("appVersion", appVersion);
551-
reportMap.putString("fromDeploymentKey", fromDeploymentKey);
552-
reportMap.putString("fromLabelOrAppVersion", fromLabel);
551+
reportMap.putString("previousDeploymentKey", previousDeploymentKey);
552+
reportMap.putString("previousLabelOrAppVersion", previousLabel);
553553
promise.resolve(reportMap);
554554
} else {
555555
// Previous status report was with a binary app version.
556556
WritableNativeMap reportMap = new WritableNativeMap();
557557
reportMap.putString("appVersion", appVersion);
558-
reportMap.putString("fromLabelOrAppVersion", previousStatusReportIdentifier);
558+
reportMap.putString("previousLabelOrAppVersion", previousStatusReportIdentifier);
559559
promise.resolve(reportMap);
560560
}
561561
return;

0 commit comments

Comments
 (0)