aspnetcore/eng/targets/Packaging.targets

41 строка
1.9 KiB
XML

<Project>
<Target Name="EnsureBaselineIsUpdated"
Condition=" '$(ValidateBaseline)' == 'true' AND
'$(IsServicingBuild)' == 'true' AND
'$(AspNetCoreBaselineVersion)' != '$(PreviousAspNetCoreReleaseVersion)' AND
'$(MSBuildProjectName)' != 'BaselineGenerator' AND
'$(MSBuildProjectName)' != 'RepoTasks' "
BeforeTargets="BeforeBuild">
<Error Text="The package baseline ($(AspNetCoreBaselineVersion)) is out of date with the latest release of this repo ($(PreviousAspNetCoreReleaseVersion)).
See $(RepoRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />
</Target>
<!-- This target is used to get the package versions of projects. A variant also exists in Npm.Common.targets. -->
<Target Name="_GetPackageVersionInfo" DependsOnTargets="$(GetPackageVersionDependsOn)"
Returns="@(_ProjectPathWithVersion)">
<ItemGroup>
<_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)">
<PackageId>$(PackageId)</PackageId>
<PackageVersion>$(PackageVersionForPackageVersionInfo)</PackageVersion>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<VersionVariableName>$(PackageId.Replace('.',''))Version</VersionVariableName>
</_ProjectPathWithVersion>
</ItemGroup>
</Target>
<PropertyGroup>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);_AppendRepositoryUrlToPackageDescription</GenerateNuspecDependsOn>
</PropertyGroup>
<Target Name="_AppendRepositoryUrlToPackageDescription"
DependsOnTargets="InitializeSourceControlInformation">
<PropertyGroup Condition="'$(RepositoryUrl)' != '' AND '$(SourceRevisionId)' != ''">
<PackageDescription>$(PackageDescription)
This package was built from the source code at $(RepositoryUrl)/tree/$(SourceRevisionId)</PackageDescription>
</PropertyGroup>
</Target>
</Project>