/// <summary> /// 获取git增量 /// </summary> public List <string> GetIncrmentFileList(bool notWrite = false) { var result = new List <string>(); using (var gitModel = new GitClient(Arguments.ProjectPath, Log)) { if (!gitModel.InitSuccess) { return(result); } var fileList = gitModel.GetChanges(); if (fileList == null || fileList.Count < 1) { Log("Increment package file count: 0", LogLevel.Warning); return(result); } Log("Increment package file count:" + fileList.Count, LogLevel.Info); if (!notWrite) { File.WriteAllLines(Arguments.PackageZipPath, fileList.ToArray(), Encoding.UTF8); } return(fileList); } }
/// <summary> /// 获取git增量 /// </summary> private void GetIncrmentFileList() { using (var gitModel = new GitClient(Arguments.ProjectPath, Log)) { if (!gitModel.InitSuccess) { return; } var fileList = gitModel.GetChanges(); if (fileList == null || fileList.Count < 1) { Log("Increment package file count: 0", LogLevel.Warning); return; } Log("Increment package file count:" + fileList.Count, LogLevel.Info); File.WriteAllLines(Arguments.PackageZipPath, fileList.ToArray(), Encoding.UTF8); } }