71 lines
3.1 KiB
XML
71 lines
3.1 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<TemplatingProjectRoot>$(MSBuildThisFileDirectory)..\modules\Templating\</TemplatingProjectRoot>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="BuildTemplates" DependsOnTargets="GeneratePropsFiles">
|
|
<PropertyGroup>
|
|
<GeneratedNoTimestampPackageVersionPropsPath>$(IntermediateDir)dependencies.notimestamp.props</GeneratedNoTimestampPackageVersionPropsPath>
|
|
<TemplateProjCommmonProperties>
|
|
RepositoryRoot=$(TemplatingProjectRoot);
|
|
DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath);
|
|
BuildNumber=$(BuildNumber);
|
|
Configuration=$(Configuration);
|
|
SkipBillOfMaterials=true;
|
|
</TemplateProjCommmonProperties>
|
|
<TemplateProjProperties>
|
|
$(TemplateProjCommmonProperties);
|
|
DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);
|
|
VersionMetadata=timestamped;
|
|
</TemplateProjProperties>
|
|
<TemplateProjNoTimestampProperties>
|
|
$(TemplateProjCommmonProperties);
|
|
DotNetPackageVersionPropsPath=$(GeneratedNoTimestampPackageVersionPropsPath);
|
|
IsFinalBuild=true;
|
|
</TemplateProjNoTimestampProperties>
|
|
</PropertyGroup>
|
|
|
|
<!-- Produce regular, timestamped templates for pre-release builds -->
|
|
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
|
Targets="CleanArtifacts;Restore;Compile;Package"
|
|
Properties="$(TemplateProjProperties)" />
|
|
|
|
<ItemGroup>
|
|
<TemplateArtifacts Include="$(TemplatingProjectRoot)artifacts\build\*" />
|
|
</ItemGroup>
|
|
|
|
<Copy SourceFiles="@(TemplateArtifacts)" DestinationFolder="$(BuildDir)" />
|
|
|
|
<!-- Gather artifact info as if this were a final build -->
|
|
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
|
Targets="GetArtifactInfo"
|
|
Properties="RepositoryRoot=%(Repository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber);IsFinalBuild=true"
|
|
ContinueOnError="WarnAndContinue"
|
|
Condition=" '%(Repository.Identity)' != ''">
|
|
<Output TaskParameter="TargetOutputs" ItemName="FinalBuildArtifactInfo" />
|
|
</MSBuild>
|
|
|
|
<ItemGroup>
|
|
<_NoTimestampPackages Include="@(ExternalDependency)" />
|
|
<_NoTimestampPackages Include="%(FinalBuildArtifactInfo.PackageId)" Version="%(FinalBuildArtifactInfo.Version)" Condition=" '%(FinalBuildArtifactInfo.ArtifactType)' == 'NuGetPackage' " />
|
|
<_NoTimestampPackages Include="Microsoft.AspNetCore.All" Version="$(PackageVersionNoTimestamp)" />
|
|
</ItemGroup>
|
|
|
|
<RepoTasks.GeneratePackageVersionPropsFile
|
|
Packages="@(_NoTimestampPackages)"
|
|
OutputPath="$(GeneratedNoTimestampPackageVersionPropsPath)" />
|
|
|
|
<!-- Rebuild the templates without restoring. (The non-timestamped packages don't exist yet.) -->
|
|
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
|
Targets="CleanArtifacts;Prepare;Compile;Package"
|
|
Properties="$(TemplateProjNoTimestampProperties);NoRestore=true" />
|
|
|
|
<ItemGroup>
|
|
<TemplateNoTimestampArtifacts Include="$(TemplatingProjectRoot)artifacts\build\*" />
|
|
</ItemGroup>
|
|
|
|
<Copy SourceFiles="@(TemplateNoTimestampArtifacts)" DestinationFolder="$(ArtifactsDir)notimestamp\" />
|
|
</Target>
|
|
|
|
</Project>
|