Skip to content

Commit

Permalink
When SDK version is changing then don't test it builds with the old v…
Browse files Browse the repository at this point in the history
…ersion (which may not be installed)
  • Loading branch information
credfeto committed Feb 15, 2024
1 parent a854d36 commit e5cc7dc
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,13 @@ private static int TemplateFolderLength(in FileContext fileContext)
DotNetVersionSettings repoDotNetSettings = await this._globalJson.LoadGlobalJsonAsync(baseFolder: repoContext.WorkingDirectory, cancellationToken: cancellationToken);
await this._dotNetSolutionCheck.PreCheckAsync(solutions: solutions, dotNetSettings: repoDotNetSettings, cancellationToken: cancellationToken);

await this._dotNetBuild.BuildAsync(basePath: sourceDirectory, buildSettings: buildSettings, cancellationToken: cancellationToken);
if (StringComparer.Ordinal.Equals(x: updateContext.DotNetSettings.SdkVersion, y: repoDotNetSettings.SdkVersion))
{
await this._dotNetBuild.BuildAsync(basePath: sourceDirectory, buildSettings: buildSettings, cancellationToken: cancellationToken);

lastKnownGoodBuild = repoContext.Repository.HeadRev;
await this._trackingCache.UpdateTrackingAsync(repoContext: repoContext, updateContext: updateContext, value: lastKnownGoodBuild, cancellationToken: cancellationToken);
lastKnownGoodBuild = repoContext.Repository.HeadRev;
await this._trackingCache.UpdateTrackingAsync(repoContext: repoContext, updateContext: updateContext, value: lastKnownGoodBuild, cancellationToken: cancellationToken);
}
}
}

Expand Down

0 comments on commit e5cc7dc

Please sign in to comment.