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

remove update.json and meta.json files in ppk (#15)

* add logic to support SENTRY_PROPERTIES parameter

* remove update.json and meta.json files in ppk

* udpapte
This commit is contained in:
波仔糕
2025-06-28 17:13:13 +08:00
committed by GitHub
parent 91a602979d
commit bd7d78e7ac

View File

@@ -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 }));