Skip to content

Commit 8e0451b

Browse files
authored
136 refactor from ix to ax# (#139)
1 parent c6b654c commit 8e0451b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cake/BuildContext.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Cake.Common.Tools.DotNet;
1313
using Cake.Common.Tools.DotNet.Build;
1414
using Cake.Common.Tools.DotNet.MSBuild;
15+
using Cake.Common.Tools.DotNet.Restore;
1516
using Cake.Common.Tools.DotNet.Run;
1617
using Cake.Common.Tools.DotNet.Test;
1718
using Cake.Common.Tools.DotNetCore.MSBuild;
@@ -37,6 +38,8 @@ public class BuildContext : FrostingContext
3738

3839
public Cake.Common.Tools.DotNet.Build.DotNetBuildSettings DotNetBuildSettings { get; }
3940

41+
public DotNetRestoreSettings DotNetRestoreTemplatesSettings { get; }
42+
4043
public Cake.Common.Tools.DotNet.Test.DotNetTestSettings DotNetTestSettings { get; }
4144

4245
public DotNetRunSettings DotNetRunSettings { get; }
@@ -59,7 +62,9 @@ public BuildContext(ICakeContext context, BuildParameters buildParameters)
5962
Verbosity = DotNetVerbosity.Quiet
6063
}
6164
};
62-
65+
66+
DotNetRestoreTemplatesSettings = new DotNetRestoreSettings() { NoCache = true, IgnoreFailedSources = true };
67+
6368
DotNetTestSettings = new DotNetTestSettings()
6469
{
6570
Verbosity = buildParameters.Verbosity,

cake/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public override void Run(BuildContext context)
332332
{
333333
if (!context.BuildParameters.DoPublish)
334334
{
335-
context.Log.Warning($"Skipping template package push.");
335+
context.Log.Warning($"Skipping template package build.");
336336
return;
337337
}
338338

@@ -385,12 +385,12 @@ public override void Run(BuildContext context)
385385
});
386386
}
387387

388+
388389
foreach (var template in context.GetTemplateProjects())
389390
{
391+
context.DotNetRestore(Path.Combine(context.ScrDir, template.solution), context.DotNetRestoreTemplatesSettings);
390392
context.DotNetBuild(Path.Combine(context.ScrDir, template.solution), context.DotNetBuildSettings);
391393
}
392-
393-
394394
}
395395
}
396396

0 commit comments

Comments
 (0)