|
@@ -28,6 +28,10 @@ class RepUrls{
|
|
|
// 拉取 Git 仓库最新代码到指定路径
|
|
// 拉取 Git 仓库最新代码到指定路径
|
|
|
function pullGitRepository(repositoryUrl, localPath) {
|
|
function pullGitRepository(repositoryUrl, localPath) {
|
|
|
if (fs.existsSync(localPath)) {
|
|
if (fs.existsSync(localPath)) {
|
|
|
|
|
+
|
|
|
|
|
+ // 切换路径 我发现不切换路径 经常会出现一些 bug
|
|
|
|
|
+ process.chdir(localPath);
|
|
|
|
|
+
|
|
|
// 路径已存在则拉取最新代码
|
|
// 路径已存在则拉取最新代码
|
|
|
console.log(`Pull ${repositoryUrl} to ${localPath}...`);
|
|
console.log(`Pull ${repositoryUrl} to ${localPath}...`);
|
|
|
|
|
|