Skip to content

Commit

Permalink
Create local NuGet feed for E2E testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Qonfused committed May 26, 2024
1 parent 4d14dcf commit 8aefa99
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ launchSettings.json
mono_crash.*

# Build results
.nuget/[Pp]ackages/
[Dd]ist/
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
[Pp]ublish/
x64/
x86/
[Aa][Rr][Mm]/
Expand Down Expand Up @@ -172,9 +174,6 @@ DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
Expand Down
File renamed without changes.
Binary file added .nuget/NuGet.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<DistDir>$(SolutionDir)\dist</DistDir>
<PublishDir>$(SolutionDir)\publish</PublishDir>
<PackageOutputPath>$(PublishDir)</PackageOutputPath>
<FeedOutputPath>$(SolutionDir)\.nuget\packages</FeedOutputPath>
</PropertyGroup>

<!-- Internal SDK Paths -->
Expand All @@ -14,6 +15,7 @@
<_MTGOSDKCoreTFM>netstandard2.0</_MTGOSDKCoreTFM>
<_MTGOSDKCoreTarget>.NETStandard2.0</_MTGOSDKCoreTarget>
<_MTGOSDKCorePath>$(SolutionDir)\MTGOSDK\bin\$(Configuration)\$(_MTGOSDKCoreTFM)</_MTGOSDKCorePath>
<NuGetExePath>$(SolutionDir)\.nuget\NuGet.exe</NuGetExePath>
</PropertyGroup>

<!-- Debugging Options -->
Expand Down
10 changes: 10 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@
<RemoveDir Directories="@(FoldersToClean)" />
</Target>

<Target Name="UpdateFeed"
AfterTargets="Pack"
Condition="'$(Configuration)' == 'Release'">
<!-- Clean the local feed -->
<Delete Files="@(FeedOutputPath)"/>
<RemoveDir Directories="@(FeedOutputPath)" />
<!-- Add the built packages to the local feed -->
<Exec Command="$(NuGetExePath) init $(PackageOutputPath) $(FeedOutputPath)" />
</Target>

</Project>

0 comments on commit 8aefa99

Please sign in to comment.