Skip to content

Commit

Permalink
Use nuspec for BlazorLazyLoading.Module package (#5)
Browse files Browse the repository at this point in the history
... and use GitVersion in it
  • Loading branch information
isc30 authored Apr 12, 2020
1 parent 5718069 commit be47d12
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
</PropertyGroup>

<PropertyGroup>
<IncludeSymbols>false</IncludeSymbols>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<PackageId>$(MSBuildProjectName)</PackageId>
<Product>$(MSBuildProjectName)</Product>
<Title>$(MSBuildProjectName)</Title>
<Description>Build tools for creating a Blazor Lazy Loadable module</Description>
</PropertyGroup>

<ItemGroup>
<Content Include="build/**/*.*" Pack="true" PackagePath="build;buildCrossTargeting;buildMultiTargeting" />
</ItemGroup>

</Project>
15 changes: 15 additions & 0 deletions nuget/BlazorLazyLoading.Module/BlazorLazyLoading.Module.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<description>$description$</description>
<authors>$author$</authors>
</metadata>
<files>
<file src="build\*.*" target="build" />
<file src="build\*.*" target="buildMultiTargeting" />
<file src="build\*.*" target="buildCrossTargeting" />
</files>
</package>
31 changes: 24 additions & 7 deletions nuget/NugetCommon.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<Project>

<ItemGroup>
<PackageReference Include="GitVersionTask" Version="5.2.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<PackageOutputDir>$(MsBuildThisFileDirectory)..\output</PackageOutputDir>
<PackageOutputPath>$(MsBuildThisFileDirectory)..\output</PackageOutputPath>
</PropertyGroup>

<PropertyGroup>
<Version>0.0.0-dev.1</Version>
<Version>0.0.0</Version>
<NoPackageAnalysis>true</NoPackageAnalysis>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand All @@ -26,11 +33,21 @@
<Copyright>Ivan Sanz Carasa (isc30)</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersionTask" Version="5.2.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="SetNuspecProperties" AfterTargets="Build">
<PropertyGroup>
<NuspecProperties>$(NuspecProperties);configuration=$(Configuration)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);version=$(Version)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);id=$(PackageId)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);author=$(Authors)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);project=$(MSBuildProjectName)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageProjectUrl=$(PackageProjectUrl)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Description=$(Description)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageReleaseNotes=$(PackageReleaseNotes)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Copyright=$(Copyright)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageTags=$(PackageTags)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryType=$(RepositoryType)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryUrl=$(RepositoryUrl)</NuspecProperties>
</PropertyGroup>
</Target>

</Project>

0 comments on commit be47d12

Please sign in to comment.