mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6db237fc8c | ||
![]() |
bd7d78e7ac |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "1.46.1",
|
||||
"version": "1.46.2",
|
||||
"description": "command line tool for react-native-update (remote updates for react native)",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
@@ -288,9 +288,22 @@ async function copyHarmonyBundle(outputFolder: string) {
|
||||
}
|
||||
await fs.remove(path.join(harmonyRawPath, 'update.json'));
|
||||
await fs.copy('update.json', path.join(harmonyRawPath, 'update.json'));
|
||||
|
||||
await fs.ensureDir(outputFolder);
|
||||
await fs.copy(harmonyRawPath, outputFolder);
|
||||
|
||||
const files = await fs.readdir(harmonyRawPath);
|
||||
for (const file of files) {
|
||||
if (file !== 'update.json' && file !== 'meta.json') {
|
||||
const sourcePath = path.join(harmonyRawPath, file);
|
||||
const destPath = path.join(outputFolder, file);
|
||||
const stat = await fs.stat(sourcePath);
|
||||
|
||||
if (stat.isFile()) {
|
||||
await fs.copy(sourcePath, destPath);
|
||||
} else if (stat.isDirectory()) {
|
||||
await fs.copy(sourcePath, destPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(t('copyHarmonyBundleError', { error }));
|
||||
throw new Error(t('copyFileFailed', { error: error.message }));
|
||||
|
Reference in New Issue
Block a user