From 3d3f71792beacdffe950238dfc32382bb971afe0 Mon Sep 17 00:00:00 2001 From: oasis Date: Mon, 4 Nov 2024 16:57:11 +0800 Subject: [PATCH] chore: delete the .git directory to prevent accidental commits --- 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.`) // 修改文件夹名称