Skip to content

Commit

Permalink
Flow version into *.psd1 files
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Jul 30, 2019
1 parent aee8898 commit 3e2b7aa
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/NuGet/EntityFramework/EntityFramework.NuGet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<NoPackageAnalysis>True</NoPackageAnalysis>
</PropertyGroup>

<ItemGroup>
<GeneratedContent Include="*.in" />
</ItemGroup>

<ItemGroup>
<NuspecProperty Include="Configuration=$(Configuration)" />
<NuspecProperty Include="NeutralLanguage=$(NeutralLanguage)" />
Expand All @@ -20,6 +24,7 @@
<NuspecProperty Include="SystemComponentModelAnnotationsVersion=$(SystemComponentModelAnnotationsVersion)" />
<NuspecProperty Include="SystemConfigurationConfigurationManagerVersion=$(SystemConfigurationConfigurationManagerVersion)" />
<NuspecProperty Include="SystemDataSqlClientVersion=$(SystemDataSqlClientVersion)" />
<NuspecProperty Include="IntermediateOutputPath=$(IntermediateOutputPath)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
Expand All @@ -30,6 +35,16 @@
<ProjectReference Include="..\..\EntityFramework.SqlServer\EntityFramework.SqlServer.csproj" />
<ProjectReference Include="..\..\ef6\ef6.csproj" />
</ItemGroup>

<!-- TODO: Use dotnet/arcade#204 when available -->
<Target Name="GenerateContent"
BeforeTargets="GenerateNuspec"
Inputs="@(GeneratedContent)"
Outputs="@(GeneratedContent->'$(IntermediateOutputPath)%(FileName)'">
<WriteLinesToFile File="$(IntermediateOutputPath)%(FileName)"
Overwrite="True"
Lines="$([System.IO.File]::ReadAllText(%(GeneratedContent.Identity)).Replace('$VersionPrefix$', $(VersionPrefix)))" />
</Target>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

Expand Down
2 changes: 2 additions & 0 deletions src/NuGet/EntityFramework/EntityFramework.NuGet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
</dependencies>
</metadata>
<files>
<file src="$IntermediateOutputPath$EntityFramework6.psd1" target="tools/"/>
<file src="$IntermediateOutputPath$EntityFramework6.PS2.psd1" target="tools/"/>
<file src="../../../artifacts/bin/EntityFramework/$Configuration$/net40/EntityFramework.dll" target="lib/net40/" />
<file src="../../../artifacts/bin/EntityFramework/$Configuration$/net40/EntityFramework.xml" target="lib/net40/" />
<file src="../../../artifacts/bin/EntityFramework/$Configuration$/net45/EntityFramework.dll" target="lib/net45/" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ModuleToProcess = 'EntityFramework6.PS2.psm1'

# Version number of this module.
ModuleVersion = '6.3.0' # TODO: Use $(VersionPrefix)
ModuleVersion = '$VersionPrefix$'

# ID used to uniquely identify this module
GUID = 'a0032654-4b7b-4934-ae70-4036796a7318'
Expand Down
Binary file not shown.

0 comments on commit 3e2b7aa

Please sign in to comment.