Skip to content

Commit

Permalink
chore: delete the .git directory to prevent accidental commits (#2698)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex.hxy <1872591453@qq.com>
  • Loading branch information
oasis-cloud and Alex-huxiyang authored Nov 7, 2024
1 parent 9e8bdd6 commit a291f58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/harmony/clone-jdharmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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.`)
// 修改文件夹名称
Expand Down

0 comments on commit a291f58

Please sign in to comment.