const download = require('clone-git-repo')

const cloneRepo = async (repo, tag, targetDir) => {
   download(`direct:https://gitee.com/keytop-cd/${repo}.git#${tag}`, targetDir, { clone: true }, function (err) {
       if (err) {
           Promise.reject(err)
       } else {
           Promise.resolve()
       }
   })
}

module.exports = {
    cloneRepo,
}
