Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ private static string PackSourceGeneratorPackage(string workspace, string versio
var repoRoot = GetRepositoryRoot();
var projectFile = Path.Combine(repoRoot, "src", "Refitter.SourceGenerator", "Refitter.SourceGenerator.csproj");
var packageOutputPath = Path.Combine(workspace, "packages");
var buildOutputPath = Path.Combine(workspace, "build");
var intermediateOutputPath = Path.Combine(workspace, "obj");

Directory.CreateDirectory(packageOutputPath);
BuildSourceGeneratorProject(repoRoot, projectFile, version);
Directory.CreateDirectory(buildOutputPath);
Directory.CreateDirectory(intermediateOutputPath);
BuildSourceGeneratorProject(repoRoot, projectFile, version, buildOutputPath, intermediateOutputPath);

var startInfo = CreateDotNetStartInfo(
repoRoot,
Expand All @@ -81,7 +85,9 @@ private static string PackSourceGeneratorPackage(string workspace, string versio
"--no-build",
"--no-restore",
$"-p:PackageVersion={version}",
$"-p:PackageOutputPath={packageOutputPath}");
$"-p:PackageOutputPath={packageOutputPath}",
$"-p:OutputPath={buildOutputPath}{Path.DirectorySeparatorChar}",
$"-p:IntermediateOutputPath={intermediateOutputPath}{Path.DirectorySeparatorChar}");

using var process = System.Diagnostics.Process.Start(startInfo);
process.Should().NotBeNull();
Expand All @@ -102,7 +108,9 @@ private static string PackSourceGeneratorPackage(string workspace, string versio
private static void BuildSourceGeneratorProject(
string repoRoot,
string projectFile,
string version)
string version,
string buildOutputPath,
string intermediateOutputPath)
{
var startInfo = CreateDotNetStartInfo(
repoRoot,
Expand All @@ -111,7 +119,9 @@ private static void BuildSourceGeneratorProject(
"-c",
"Release",
"-p:GeneratePackageOnBuild=false",
$"-p:PackageVersion={version}");
$"-p:PackageVersion={version}",
$"-p:OutputPath={buildOutputPath}{Path.DirectorySeparatorChar}",
$"-p:IntermediateOutputPath={intermediateOutputPath}{Path.DirectorySeparatorChar}");

using var process = System.Diagnostics.Process.Start(startInfo);
process.Should().NotBeNull();
Expand Down
Loading