react-native-stallion 2.4.3-alpha.2 → 2.4.3-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,7 +50,10 @@ public class StallionPatchHandler {
|
|
|
50
50
|
// Create a temporary directory for the patched bundle
|
|
51
51
|
File tempPatchedDir = new File(diffDir.getParent(), diffDir.getName() + "_patched_temp");
|
|
52
52
|
try {
|
|
53
|
-
//
|
|
53
|
+
// Clear any leftover temp dir, then copy base bundle
|
|
54
|
+
if (tempPatchedDir.exists()) {
|
|
55
|
+
StallionFileManager.deleteFileOrFolderSilently(tempPatchedDir);
|
|
56
|
+
}
|
|
54
57
|
StallionFileManager.copyDirectory(baseBundleDir, tempPatchedDir);
|
|
55
58
|
|
|
56
59
|
// Read and parse manifest.json
|
|
@@ -69,6 +69,7 @@ public class StallionSlotManager {
|
|
|
69
69
|
File newSlot = new File(baseFolderPath, StallionConfigConstants.PROD_DIRECTORY + StallionConfigConstants.NEW_FOLDER_SLOT);
|
|
70
70
|
File stableSlot = new File(baseFolderPath, StallionConfigConstants.PROD_DIRECTORY + StallionConfigConstants.STABLE_FOLDER_SLOT);
|
|
71
71
|
|
|
72
|
+
StallionFileManager.deleteFileOrFolderSilently(stableSlot);
|
|
72
73
|
StallionFileManager.copyDirectory(newSlot, stableSlot);
|
|
73
74
|
|
|
74
75
|
String newReleaseHash = stateManager.stallionMeta.getProdNewHash();
|
|
@@ -54,7 +54,10 @@ class StallionPatchHandler {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// Clear any leftover temp dir, then copy base bundle
|
|
58
|
+
if FileManager.default.fileExists(atPath: tempPatchedDir.path) {
|
|
59
|
+
try? FileManager.default.removeItem(at: tempPatchedDir)
|
|
60
|
+
}
|
|
58
61
|
StallionFileManager.copyFileOrDirectory(from: baseBundlePath, to: tempPatchedDir.path)
|
|
59
62
|
|
|
60
63
|
// Verify copy succeeded
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
StallionStateManager *stateManager = [StallionStateManager sharedInstance];
|
|
51
51
|
NSString *baseFolderPath = stateManager.stallionConfig.filesDirectory;
|
|
52
52
|
|
|
53
|
-
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"
|
|
54
|
-
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"
|
|
55
|
-
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"
|
|
53
|
+
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"%@/%@/%@", baseFolderPath, StallionObjConstants.prod_directory, StallionObjConstants.new_folder_slot]];
|
|
54
|
+
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"%@/%@/%@", baseFolderPath, StallionObjConstants.prod_directory, StallionObjConstants.stable_folder_slot]];
|
|
55
|
+
[StallionFileManager deleteFileOrFolderSilently:[NSString stringWithFormat:@"%@/%@/%@", baseFolderPath, StallionObjConstants.prod_directory, StallionObjConstants.temp_folder_slot]];
|
|
56
56
|
|
|
57
57
|
[stateManager clearStallionMeta];
|
|
58
58
|
}
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
NSString *newSlotPath = [NSString stringWithFormat:@"%@/%@/%@", baseFolderPath, StallionObjConstants.prod_directory, StallionObjConstants.new_folder_slot];
|
|
75
75
|
NSString *stableSlotPath = [NSString stringWithFormat:@"%@/%@/%@", baseFolderPath, StallionObjConstants.prod_directory, StallionObjConstants.stable_folder_slot];
|
|
76
76
|
|
|
77
|
-
[StallionFileManager
|
|
77
|
+
[StallionFileManager deleteFileOrFolderSilently:stableSlotPath];
|
|
78
|
+
[StallionFileManager copyFileOrDirectoryFrom:newSlotPath to:stableSlotPath];
|
|
78
79
|
|
|
79
80
|
NSString *newReleaseHash = stateManager.stallionMeta.prodNewHash;
|
|
80
81
|
[stateManager.stallionMeta setProdStableHash:newReleaseHash];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-stallion",
|
|
3
|
-
"version": "2.4.3-alpha.
|
|
3
|
+
"version": "2.4.3-alpha.3",
|
|
4
4
|
"description": "Official React Native OTA updates SDK — CodePush alternative with patch updates, rollback, and bundle signing.",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"types": "types/index.d.ts",
|