Skip to content

Commit

Permalink
update updater
Browse files Browse the repository at this point in the history
  • Loading branch information
GhomKrosmonaute committed Jan 8, 2025
1 parent 687ddfc commit d62068e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/update-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ async function _overrideNativeFiles() {

for (const relativePath of matches) {
const source = path.join(rootDir, relativePath)
const dest = path.join(
rootDir,
relativePath.replace("temp" + path.sep, ""),
)
const dest = source.replace(path.sep + "temp" + path.sep, path.sep)

console.log(dest)

await fs.promises.mkdir(path.dirname(dest), { recursive: true })

Expand All @@ -124,11 +123,12 @@ async function _overrideNativeFiles() {
async function _copyConfig() {
const files = glob.sync("temp/src/{config.ts,types.ts}", { cwd: rootDir })

for (const file of files) {
const dest = path.join(rootDir, file.replace("temp" + path.sep, ""))
for (const relativePath of files) {
const source = path.join(rootDir, relativePath)
const dest = source.replace(path.sep + "temp" + path.sep, path.sep)

if (!fs.existsSync(dest)) {
await fs.promises.copyFile(file, dest)
await fs.promises.copyFile(source, dest)
}
}

Expand Down

0 comments on commit d62068e

Please sign in to comment.