Skip to content

Commit

Permalink
Merge pull request #246 from sharparchitecture/releases/6.1.1
Browse files Browse the repository at this point in the history
Releases/6.1.1
  • Loading branch information
cd21h authored Apr 30, 2021
2 parents c9f1c6e + bcbcd12 commit 9a8cd33
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PackageIconUrl>https://github.com/sharparchitecture/Sharp-Architecture/raw/master/Artefacts/Documentation/icon.png</PackageIconUrl>
<PackageProjectUrl>http://sharparchitecture.github.io/</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes>https://github.com/sharparchitecture/Sharp-Architecture/releases/tag/6.0.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/sharparchitecture/Sharp-Architecture/releases/tag/6.1.1</PackageReleaseNotes>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
2 changes: 2 additions & 0 deletions SharpArch.AutoLoad.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ FluentAssertions.AssertionExtensions.Should($EXPR$).NotBeNull()&#xD;
<s:Boolean x:Key="/Default/Environment/Editor/QuickInfo/EnableQuickInfo/@EntryValue">True</s:Boolean>

<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/SolutionBuilderNext/ParallelProcessesCount2/@EntryValue">3</s:Int64>
<s:String x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/ShowTypeNameHintsForLambdaExpressionParameters/@EntryValue">Never</s:String>
<s:Boolean x:Key="/Default/Environment/MemoryUsageIndicator/IsVisible/@EntryValue">True</s:Boolean>


Expand Down Expand Up @@ -404,6 +405,7 @@ FluentAssertions.AssertionExtensions.Should($EXPR$).NotBeNull()&#xD;
<s:Boolean x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=TextEditor_002DTrackChanges_002D2/@EntryIndexRemoved">True</s:Boolean>
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=XAML_0020Designer/@EntryIndexedValue"></s:String>
<s:Boolean x:Key="/Default/Environment/PerformanceGuide/SwitchConflictResolutionMode/=XAML_0020Designer/@EntryIndexRemoved">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECSharp_002ETypeNameHints_002ECSharpTypeNameHintsOptionsMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
18 changes: 10 additions & 8 deletions Src/SharpArch.Infrastructure/Caching/DependencyList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DependencyList

private readonly IFileSystem _fileSystem;
private string _basePath;

public static DependencyList WithPathPrefix([NotNull] string basePath, IFileSystem fileSystem = null)
{
if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("Value cannot be null or empty.", nameof(basePath));
Expand Down Expand Up @@ -126,13 +126,15 @@ private string GetCodeBasePath()
public static string GetAssemblyCodeBasePath([NotNull] Assembly assembly)
{
if (assembly == null) throw new ArgumentNullException(nameof(assembly));

string path = null;
#if NET5_0
var uri = new UriBuilder(assembly.Location);
#else
path = assembly.Location;
#else
var uri = new UriBuilder(assembly.CodeBase);
#endif
var uriPath = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(uriPath);
path = Uri.UnescapeDataString(uri.Path);
#endif
return Path.GetDirectoryName(path);
}

/// <summary>
Expand All @@ -157,8 +159,8 @@ private string FindFile(string path)
if (_fileSystem.FileExists(codePath)) return codePath;

// try with .dll extension added
var dllPath = path.IndexOf(".dll", StringComparison.InvariantCultureIgnoreCase) == -1
? path + ".dll"
var dllPath = path.IndexOf(".dll", StringComparison.InvariantCultureIgnoreCase) == -1
? path + ".dll"
: path;
if (_fileSystem.FileExists(dllPath)) return dllPath;

Expand Down
7 changes: 7 additions & 0 deletions VersionHistory.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
========================
S#arp 6.1.1
========================

FIXES:
* #245: Exception in DependencyList on .NET 5/Linux

========================
S#arp 6.1
========================
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ cache:
install:
- ps: ./dotnet-install.ps1 -Version 2.2.100 -InstallDir "C:\Program Files\dotnet"
- ps: ./mssql-setup.ps1
- ps: dotnet tool install Cake.Tool --version 1.1.0 --global

build_script:
- ps: ./build.ps1 -Verbosity Verbose
- ps: dotnet cake

test: off

Expand Down
32 changes: 17 additions & 15 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
// ADDINS
#addin nuget:?package=Cake.Coveralls&version=0.10.2
#addin nuget:?package=Cake.FileHelpers&version=3.3.0
#addin nuget:?package=Cake.Incubator&version=5.1.0
#addin nuget:?package=Cake.Issues&version=0.9.1
#addin nuget:?package=Cake.AppVeyor&version=4.0.0
#addin nuget:?package=Cake.Coveralls&version=1.0.1
#addin nuget:?package=Cake.FileHelpers&version=4.0.1
//#addin nuget:?package=Cake.Issues&version=0.9.1
#addin nuget:?package=Cake.AppVeyor&version=5.0.1
#addin nuget:?package=Cake.ReSharperReports&version=0.11.1

// TOOLS
#tool nuget:?package=GitReleaseManager&version=0.11.0
#tool nuget:?package=GitVersion.CommandLine&version=5.5.1
#tool nuget:?package=GitVersion.CommandLine&version=5.6.7
#tool nuget:?package=coveralls.io&version=1.4.2
#tool nuget:?package=OpenCover&version=4.7.922
#tool nuget:?package=ReportGenerator&version=4.8.1
//#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.3.4
#tool nuget:?package=ReportGenerator&version=4.8.7
#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2020.3.4

// ARGUMENTS
var target = Argument("target", "Default");
Expand Down Expand Up @@ -60,15 +59,15 @@ var milestone = semVersion.MajorMinorPatch;
var artifactsDir = "./Drops";
var artifactsDirAbsolutePath = MakeAbsolute(Directory(artifactsDir));

var testCoverageOutputFile = artifactsDir + "/OpenCover.xml";
var testCoverageOutputFile = new FilePath(artifactsDir + "/OpenCover.xml");
var codeCoverageReportDir = artifactsDir + "/CodeCoverageReport";
var codeInspectionsOutputFile = artifactsDir + "/Inspections/CodeInspections.xml";
var duplicateFinderOutputFile = artifactsDir + "/Inspections/CodeDuplicates.xml";

var packagesDir = artifactsDir + "/packages";
var srcDir = "./Src";
var testsRootDir = srcDir + "/tests";
var solutionFile = srcDir + "/SharpArch.sln";
var solutionFile = new FilePath(srcDir + "/SharpArch.sln");
var samplesDir = "./Samples";
var coverageFilter="+[SharpArch*]* -[SharpArch.Tests*]* -[SharpArch.Xunit*]* -[SharpArch.Infrastructure]SharpArch.Infrastructure.Logging.*";

Expand Down Expand Up @@ -110,7 +109,7 @@ Task("UpdateAppVeyorBuildNumber")


Task("Restore")
.DoesForEach(GetFiles(solutionFile).Union(GetFiles($"{samplesDir}/**/*.sln")),
.DoesForEach(GetFiles(solutionFile.ToString()).Union(GetFiles($"{samplesDir}/**/*.sln")),
(sln) => {
Information("Running in {0}", sln.GetDirectory().FullPath);
DotNetCoreRestore(sln.GetDirectory().FullPath);
Expand Down Expand Up @@ -155,7 +154,7 @@ Task("InspectCode")


Task("RunXunitTests")
.DoesForEach(GetFiles(solutionFile).Union(GetFiles($"{samplesDir}/**/*.sln")),
.DoesForEach(GetFiles(solutionFile.ToString()).Union(GetFiles($"{samplesDir}/**/*.sln")),
(testProj) => {
var projectPath = testProj.GetDirectory();
var projectFilename = testProj.GetFilenameWithoutExtension();
Expand Down Expand Up @@ -214,7 +213,10 @@ Task("CleanPreviousTestResults")
DeleteFile(testCoverageOutputFile);
DeleteFiles(artifactsDir + "/*.trx");
if (DirectoryExists(codeCoverageReportDir))
DeleteDirectory(codeCoverageReportDir, recursive: true);
DeleteDirectory(codeCoverageReportDir, new DeleteDirectorySettings{
Recursive = true,
Force = true
});
});


Expand Down Expand Up @@ -251,8 +253,8 @@ Task("Build")
var slnPath = solutionFile.GetDirectory().FullPath;
var sln = solutionFile.GetFilenameWithoutExtension();
if (isReleaseBuild) {
Information("Running {0} {1} build for code coverage", sln, "Debug");
// need Debug build for code coverage
Information("Running {0} {1} build to calculate code coverage", sln, "Debug");
// need Debug mode build for code coverage calculation
DotNetCoreBuild(slnPath, new DotNetCoreBuildSettings {
NoRestore = true,
Configuration = "Debug",
Expand Down

0 comments on commit 9a8cd33

Please sign in to comment.