Skip to content

Commit 7f1c0f2

Browse files
committed
debugging
1 parent 8048f0d commit 7f1c0f2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/tooling/docs-builder/Cli/DiffCommands.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@ public async Task<int> ValidateRedirects([Argument] string? path = null, Cancel
4141
var fs = new FileSystem();
4242
var root = fs.DirectoryInfo.New(Paths.WorkingDirectoryRoot.FullName);
4343

44-
_log.LogInformation($"Initializing build context for redirect rule validation. Environment: {(runningOnCi ? "CI" : "Local")}, Lookup path: {path}");
4544
var buildContext = new BuildContext(collector, fs, fs, configurationContext, ExportOptions.MetadataOnly, root.FullName, null);
4645
var sourceFile = buildContext.ConfigurationPath;
4746
var redirectFileName = sourceFile.Name.StartsWith('_') ? "_redirects.yml" : "redirects.yml";
4847
var redirectFileInfo = sourceFile.FileSystem.FileInfo.New(Path.Combine(sourceFile.Directory!.FullName, redirectFileName));
4948

50-
_log.LogInformation($"Parsing redirects file: {redirectFileInfo.FullName}");
5149
var redirectFileParser = new RedirectFile(redirectFileInfo, buildContext);
5250
var redirects = redirectFileParser.Redirects;
5351

@@ -58,7 +56,6 @@ public async Task<int> ValidateRedirects([Argument] string? path = null, Cancel
5856
return collector.Errors;
5957
}
6058

61-
_log.LogInformation("Initializing repository tracker");
6259
IRepositoryTracker tracker = runningOnCi ? new IntegrationGitRepositoryTracker(logFactory.CreateLogger<IntegrationGitRepositoryTracker>(), path) : new LocalGitRepositoryTracker(collector, root, path);
6360
var changed = tracker.GetChangedFiles() as GitChange[] ?? [];
6461

src/tooling/docs-builder/Tracking/IntegrationGitRepositoryTracker.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class IntegrationGitRepositoryTracker(ILogger<IntegrationGitRepositoryTra
1313
public IEnumerable<GitChange> GetChangedFiles()
1414
{
1515
var deletedFiles = Environment.GetEnvironmentVariable("DELETED_FILES") ?? string.Empty;
16+
Log.LogInformation("Deleted files: {File} as deleted in integration build", deletedFiles);
1617
if (!string.IsNullOrEmpty(deletedFiles))
1718
{
1819
foreach (var file in deletedFiles.Split(' ', StringSplitOptions.RemoveEmptyEntries).Where(f => f.StartsWith(LookupPath)))
@@ -37,6 +38,7 @@ public IEnumerable<GitChange> GetChangedFiles()
3738
}
3839

3940
var renamedFiles = Environment.GetEnvironmentVariable("RENAMED_FILES");
41+
Log.LogInformation("Renamed files: {File} as deleted in integration build", renamedFiles);
4042
if (!string.IsNullOrEmpty(renamedFiles))
4143
{
4244
foreach (var pair in renamedFiles.Split(' ', StringSplitOptions.RemoveEmptyEntries).Where(f => f.StartsWith(LookupPath)))

0 commit comments

Comments
 (0)