Skip to content

Commit

Permalink
Merge pull request #447 from TortugaResearch/Remove-Source-Generator-…
Browse files Browse the repository at this point in the history
…From-NuGet

Cleanup NuGet package code.
  • Loading branch information
Grauenwolf authored May 10, 2022
2 parents 0e40138 + 9ac06e4 commit b841d07
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 305 deletions.
35 changes: 6 additions & 29 deletions Tortuga.Chain/Tortuga.Chain.Access/Tortuga.Chain.Access.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>
<Version>4.0.2</Version>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -80,9 +78,12 @@

<!-- Code Generator -->
<ItemGroup>
<PackageReference Include="Tortuga.Shipwright" Version="0.6.0" />
<PackageReference Include="Tortuga.Shipwright" Version="0.9.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Tortuga.Shipwright.Shared" Version="0.9.0" />
</ItemGroup>

<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
Expand All @@ -95,31 +96,7 @@
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/*/**/*.cs" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -54,31 +52,7 @@
<Compile Include="..\Shared\GlobalUsing.cs" Link="GlobalUsing.cs" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -57,31 +55,7 @@
<PackageReference Include="Tortuga.Chain.Core" Version="4.0.0" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -55,31 +53,7 @@
<Compile Include="..\Shared\GlobalUsing.cs" Link="GlobalUsing.cs" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
28 changes: 1 addition & 27 deletions Tortuga.Chain/Tortuga.Chain.Core/Tortuga.Chain.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -46,32 +44,8 @@
<PackageReference Include="Tortuga.Anchor" Version="4.0.0" />
</ItemGroup>


<!-- NuGet Packaging Boilerplate-->

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
33 changes: 5 additions & 28 deletions Tortuga.Chain/Tortuga.Chain.MySql/Tortuga.Chain.MySql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>
<Version>4.0.2</Version>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -72,7 +70,10 @@

<!-- Code Generator -->
<ItemGroup>
<PackageReference Include="Tortuga.Shipwright" Version="0.6.0" />
<PackageReference Include="Tortuga.Shipwright" Version="0.9.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Tortuga.Shipwright.Shared" Version="0.9.0" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -87,31 +88,7 @@
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/*/**/*.cs" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>
<Version>4.0.2</Version>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -71,7 +69,10 @@

<!-- Code Generator -->
<ItemGroup>
<PackageReference Include="Tortuga.Shipwright" Version="0.6.0" />
<PackageReference Include="Tortuga.Shipwright" Version="0.9.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Tortuga.Shipwright.Shared" Version="0.9.0" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -87,31 +88,7 @@
</ItemGroup>


<!-- NuGet Packaging Boilerplate-->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
35 changes: 6 additions & 29 deletions Tortuga.Chain/Tortuga.Chain.SQLite/Tortuga.Chain.SQLite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
<ProductName>Tortuga Chain</ProductName>
<Deterministic>true</Deterministic>

<AssemblyVersion>4.0.0</AssemblyVersion>
<Version>4.0.0</Version>
<FileVersion>4.0.0.0</FileVersion>
<Version>4.0.2</Version>

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Expand Down Expand Up @@ -82,7 +80,10 @@

<!-- Code Generator -->
<ItemGroup>
<PackageReference Include="Tortuga.Shipwright" Version="0.6.0" />
<PackageReference Include="Tortuga.Shipwright" Version="0.9.0" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Tortuga.Shipwright.Shared" Version="0.9.0" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -96,32 +97,8 @@
some other tool. -->
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/*/**/*.cs" />
</ItemGroup>

<!-- NuGet Packaging Boilerplate-->

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly</GenerateNuspecDependsOn>
</PropertyGroup>

<Target Name="ReadPackageVersionFromOutputAssembly" DependsOnTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">

<PropertyGroup>
<FirstTargetFramework>$([System.String]::Copy($(TargetFrameworks)).Split(';').GetValue(0))</FirstTargetFramework>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="ReadPackageVersionFromOutputAssemblySingleTfm" Properties="TargetFramework=$(FirstTargetFramework)">
<Output TaskParameter="TargetOutputs" ItemName="PackAssembly" />
</MSBuild>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>

<Target Name="ReadPackageVersionFromOutputAssemblySingleTfm" Returns="@(PackAssembly)" Condition="'$(IsCrossTargetingBuild)' != 'true'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="PackAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<PackageVersion>%(PackAssembly.Version)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
Loading

0 comments on commit b841d07

Please sign in to comment.