Skip to content

Commit

Permalink
fixed the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Brady Gaster authored and Brady Gaster committed Apr 18, 2020
1 parent 9016024 commit b9d6cfe
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Start/COVIDScreeningApi/COVIDScreeningApi/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,24 @@
<OnError ExecuteTargets="InformCustomerHowToOverrideSwaggerDocName"/>
</Target>

<!-- cleanup the Swashbuckle CLI dependencies -->
<Target Name="CleanUpAfterSwaggerGeneration"
AfterTargets="CreateSwaggerFile,InformCustomerHowToOverrideSwaggerDocName">
<!-- uninstall the Swashbuckle CLI, as it is no longer needed -->
<Exec Command="dotnet tool uninstall Swashbuckle.AspNetCore.Cli &gt;&gt; swagger-log.txt" />
<!-- delete the log file of our swagger-file-creation process -->
<Delete Files="swagger-log.txt" />
<!-- remove the tool manifest if we created it -->
<RemoveDir Directories=".config" Condition="!$(ToolManifestExists)"/>
</Target>

<!--
In the case that the customer isn't using "v1" as the Open API doc,
we need to tell them how to mitigate it.
-->
<Target Name="InformCustomerHowToOverrideSwaggerDocName">
<Message Importance="High"
Text="Tell the customers how to unbreak themselves here by setting the 'OpenApiDocumentName' property in their .csproj file to override the default."/>
<CallTarget Targets="CleanUpAfterSwaggerGeneration"/>
</Target>

<!-- cleanup the Swashbuckle CLI dependencies -->
<Target Name="CleanUpAfterSwaggerGeneration" AfterTargets="CreateSwaggerFile">
<!-- uninstall the Swashbuckle CLI, as it is no longer needed -->
<Exec Command="dotnet tool uninstall Swashbuckle.AspNetCore.Cli &gt;&gt; swagger-log.txt" />
<!-- delete the log file of our swagger-file-creation process -->
<Delete Files="swagger-log.txt" />
<!-- remove the tool manifest if we created it -->
<RemoveDir Directories=".config" Condition="!$(ToolManifestExists)"/>
</Target>

</Project>

0 comments on commit b9d6cfe

Please sign in to comment.