Skip to content

Commit b973ace

Browse files
committed
Update version to 2.3.1 in package.json and add support for harmony platform in runReactNativeBundleCommand to handle asset copying and file movement.
1 parent e81744b commit b973ace

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-update-cli",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "command line tool for react-native-update (remote updates for react native)",
55
"main": "index.js",
66
"bin": {

src/bundle.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,19 @@ async function runReactNativeBundleCommand({
256256
!isSentry,
257257
);
258258
}
259+
if (platform === 'harmony') {
260+
const harmonyRawAssetsPath =
261+
'harmony/entry/src/main/resources/rawfile/assets';
262+
// copy all files in outputFolder to harmonyRawPath
263+
// assets should be in rawfile/assets
264+
fs.ensureDirSync(harmonyRawAssetsPath);
265+
fs.copySync(outputFolder, harmonyRawAssetsPath, { overwrite: true });
266+
fs.moveSync(
267+
`${harmonyRawAssetsPath}/bundle.harmony.js`,
268+
`${harmonyRawAssetsPath}/../bundle.harmony.js`,
269+
{ overwrite: true },
270+
);
271+
}
259272
resolve(null);
260273
}
261274
});

0 commit comments

Comments
 (0)