1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-10-28 05:23:09 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Update version to 2.3.1 in package.json and add support for harmony platform in runReactNativeBundleCommand to handle asset copying and file movement.

This commit is contained in:
sunnylqm
2025-10-26 18:05:18 +08:00
parent e81744b52a
commit b973ace443
2 changed files with 14 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update-cli",
"version": "2.3.0",
"version": "2.3.1",
"description": "command line tool for react-native-update (remote updates for react native)",
"main": "index.js",
"bin": {

View File

@@ -256,6 +256,19 @@ async function runReactNativeBundleCommand({
!isSentry,
);
}
if (platform === 'harmony') {
const harmonyRawAssetsPath =
'harmony/entry/src/main/resources/rawfile/assets';
// copy all files in outputFolder to harmonyRawPath
// assets should be in rawfile/assets
fs.ensureDirSync(harmonyRawAssetsPath);
fs.copySync(outputFolder, harmonyRawAssetsPath, { overwrite: true });
fs.moveSync(
`${harmonyRawAssetsPath}/bundle.harmony.js`,
`${harmonyRawAssetsPath}/../bundle.harmony.js`,
{ overwrite: true },
);
}
resolve(null);
}
});