Skip to content

Commit

Permalink
Use artifacts output (#18)
Browse files Browse the repository at this point in the history
* Use artifacts output

* Minor corrections

---------

Co-authored-by: Adam Simon <[email protected]>
  • Loading branch information
lahma and adams85 authored Nov 19, 2024
1 parent 035bb77 commit 42c9211
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>true</WarningsAsErrors>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>

<PropertyGroup Label="Code Analysis">
Expand Down
1 change: 1 addition & 0 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
<UseArtifactsOutput>false</UseArtifactsOutput>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public class SourceGeneratorTest

protected static string ToSourcePath(string path, string project = MainProject)
{
return Path.Combine($"../../../../../src/{project}/", path);
return Path.Combine($"../../../../src/{project}/", path);
}
}
7 changes: 3 additions & 4 deletions test/Acornima.Tests/ParserTests.Fixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ internal static string GetFixturesPath()
{
#if NETFRAMEWORK
var assemblyPath = new Uri(typeof(RegExpTests).GetTypeInfo().Assembly.CodeBase).LocalPath;
var assemblyDirectory = new FileInfo(assemblyPath).Directory;
#else
var assemblyPath = typeof(RegExpTests).GetTypeInfo().Assembly.Location;
var assemblyDirectory = new FileInfo(assemblyPath).Directory;
#endif
var root = assemblyDirectory?.Parent?.Parent?.Parent?.FullName;
return root ?? "";
var assemblyDirectory = new FileInfo(assemblyPath).Directory;
var root = Path.Combine(assemblyDirectory?.Parent?.Parent?.Parent?.Parent?.FullName ?? "", "test", "Acornima.Tests");
return root;
}

public static IEnumerable<object[]> Fixtures(string relativePath)
Expand Down

0 comments on commit 42c9211

Please sign in to comment.