From a291f588610ce269ea7ead29720f83ff218869a5 Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:14:14 +0800 Subject: [PATCH] chore: delete the .git directory to prevent accidental commits (#2698) Co-authored-by: Alex.hxy <1872591453@qq.com> --- scripts/harmony/clone-jdharmony.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/harmony/clone-jdharmony.js b/scripts/harmony/clone-jdharmony.js index 922c43b9eb..78e18e26dc 100644 --- a/scripts/harmony/clone-jdharmony.js +++ b/scripts/harmony/clone-jdharmony.js @@ -3,6 +3,7 @@ const os = require('os') const path = require('path') const { remove, ensureDir } = require('fs-extra') const fs = require('fs') +const fse = require('fs-extra') const args = process.argv.splice(2) const home = os.homedir() @@ -22,6 +23,7 @@ async function cloneJdHarmony() { console.log(`Clone ${platform}, branch: ${branch}`) await git.clone(remote, ['-b', branch, '--depth', '1']) + await fse.remove(path.join(__dirname, '../../packages/JDHarmony/.git')) console.log(`Clone completed successfully.`) // 修改文件夹名称