Skip to content

Commit

Permalink
Another attempt to fix paths
Browse files Browse the repository at this point in the history
Try to fix the path to dotnet-swagger in CI.
  • Loading branch information
martincostello committed Apr 3, 2024
1 parent 11e6ce7 commit 33181c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions test/WebSites/CliExample/CliExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)', 'dotnet-swagger.dll'))</DotNetSwaggerPath>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)'))</DotNetSwaggerPath>
</PropertyGroup>

<ItemGroup>
Expand All @@ -28,7 +28,8 @@
-->

<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet %22$(DotNetSwaggerPath)%22 tofile --host http://localhost:51071 --output %22$(MSBuildThisFileDirectory)wwwroot/swagger/v1/swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1" />
<Exec Command="dotnet dotnet-swagger.dll tofile --host http://localhost:51071 --output %22$(MSBuildThisFileDirectory)wwwroot/swagger/v1/swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1"
WorkingDirectory="$(DotNetSwaggerPath)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)', 'dotnet-swagger.dll'))</DotNetSwaggerPath>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)'))</DotNetSwaggerPath>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -32,7 +32,8 @@
-->

<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet %22$(DotNetSwaggerPath)%22 tofile --host http://localhost:57556/ --output %22$(MSBuildThisFileDirectory)wwwroot/swagger/v1/swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1" />
<Exec Command="dotnet dotnet-swagger.dll tofile --host http://localhost:57556/ --output %22$(MSBuildThisFileDirectory)wwwroot/swagger/v1/swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1"
WorkingDirectory="$(DotNetSwaggerPath)" />
</Target>

</Project>
5 changes: 3 additions & 2 deletions test/WebSites/NswagClientExample/NswagClientExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)', 'dotnet-swagger.dll'))</DotNetSwaggerPath>
<DotNetSwaggerPath>$([System.IO.Path]::Combine('$(ArtifactsPath)', 'bin', 'Swashbuckle.AspNetCore.Cli', '$(Configuration)_$(TargetFramework)'))</DotNetSwaggerPath>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,7 +22,8 @@
</ItemGroup>

<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet %22$(DotNetSwaggerPath)%22 tofile --host http://example.com --output %22$(MSBuildThisFileDirectory)swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1" />
<Exec Command="dotnet dotnet-swagger.dll tofile --host http://example.com --output %22$(MSBuildThisFileDirectory)swagger.json%22 %22$(OutputPath)$(AssemblyName).dll%22 v1"
WorkingDirectory="$(DotNetSwaggerPath)" />
</Target>

<Target Name="NSwag" AfterTargets="SwaggerToFile">
Expand Down

0 comments on commit 33181c2

Please sign in to comment.