Skip to content
Snippets Groups Projects
Commit e154ef1e authored by L. Ellenbeck's avatar L. Ellenbeck
Browse files

Updated build script

parent 5577b29f
No related branches found
No related tags found
1 merge request!36Content MD for resource type RDS
...@@ -24,7 +24,11 @@ var solutionFile = GetFiles("./**/*.sln").First(); ...@@ -24,7 +24,11 @@ var solutionFile = GetFiles("./**/*.sln").First();
var projectName = solutionFile.GetFilenameWithoutExtension().ToString(); var projectName = solutionFile.GetFilenameWithoutExtension().ToString();
var assemblyInfoSubPath = "Properties/AssemblyInfo.cs"; var assemblyInfoSubPath = "Properties/AssemblyInfo.cs";
var nugetSource = "https://api.nuget.org/v3/index.json"; var nugetSource = "https://api.nuget.org/v3/index.json";
var localNugetFeed = new
{
Name = "LocalNuget",
Source = @"C:\LocalNuget"
};
// get latest MSBuild version // get latest MSBuild version
var vsLatest = VSWhereLatest(); var vsLatest = VSWhereLatest();
var msBuildPathX64 = (vsLatest == null) ? null : vsLatest.CombineWithFilePath("./MSBuild/Current/Bin/MSBuild.exe"); var msBuildPathX64 = (vsLatest == null) ? null : vsLatest.CombineWithFilePath("./MSBuild/Current/Bin/MSBuild.exe");
...@@ -89,6 +93,10 @@ Task("Restore") ...@@ -89,6 +93,10 @@ Task("Restore")
.Does(() =>{ .Does(() =>{
// Restore all NuGet packages. // Restore all NuGet packages.
Information($"Restoring {solutionFile}..."); Information($"Restoring {solutionFile}...");
if(!NuGetHasSource(localNugetFeed.Source))
{
NuGetAddSource(localNugetFeed.Name, localNugetFeed.Source);
}
NuGetRestore(solutionFile, new NuGetRestoreSettings { NuGetRestore(solutionFile, new NuGetRestoreSettings {
NoCache = true NoCache = true
}); });
...@@ -103,7 +111,7 @@ Task("DupFinder") ...@@ -103,7 +111,7 @@ Task("DupFinder")
OutputFile = $"{artifactsDir}/dupfinder.xml", OutputFile = $"{artifactsDir}/dupfinder.xml",
ExcludeCodeRegionsByNameSubstring = dupFinderExcludeCodeRegionsByNameSubstring, ExcludeCodeRegionsByNameSubstring = dupFinderExcludeCodeRegionsByNameSubstring,
ExcludePattern = dupFinderExcludePatterns.ToArray(), ExcludePattern = dupFinderExcludePatterns.ToArray(),
ThrowExceptionOnFindingDuplicates = true ThrowExceptionOnFindingDuplicates = false
}; };
DupFinder(solutionFile, settings); DupFinder(solutionFile, settings);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment