commit
1e9e86e0d6
6 changed files with 24 additions and 16 deletions
|
@ -16,6 +16,8 @@
|
|||
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' " />
|
||||
|
||||
<Import Project="..\src\redist\targets\Versions.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Because we may be building in a container, we should use an asset manifest file path
|
||||
that exists in the container. Disambiguate the manifests via available properties.
|
||||
|
@ -53,6 +55,7 @@
|
|||
|
||||
<Target Name="PublishSdkAssetsAndChecksums"
|
||||
BeforeTargets="Publish"
|
||||
DependsOnTargets="GenerateFullNuGetVersion"
|
||||
Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' ">
|
||||
|
||||
<!-- If the sdk version is stabilized, then we should double publish the binaries to suffixed file names.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<Import Project="targets\BranchInfo.props" />
|
||||
<Import Project="..\redist\targets\BuildCoreSdkTasks.targets" />
|
||||
<Import Project="..\redist\targets\GetRuntimeInformation.targets" />
|
||||
<Import Project="..\redist\targets\SetBuildDefaults.targets" />
|
||||
<Import Project="..\redist\targets\Versions.targets" />
|
||||
|
||||
<Import Project="targets\FinishBuild.targets" />
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="FinalizeBuild"
|
||||
BeforeTargets="AfterBuild">
|
||||
BeforeTargets="AfterBuild"
|
||||
DependsOnTargets="GenerateFullNuGetVersion;GetCommitHash">
|
||||
<CopyBlobsToLatest FeedUrl="$(DotnetPublishSdkAssetsBlobFeedUrl)"
|
||||
AccountKey="$(DotNetPublishSdkAssetsBlobFeedKey)"
|
||||
NugetVersion="$(FullNugetVersion)"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<Import Project="targets\BuildCoreSdkTasks.targets" />
|
||||
<Import Project="targets\GetRuntimeInformation.targets" />
|
||||
<Import Project="targets\SetBuildDefaults.targets" />
|
||||
<Import Project="targets\Versions.targets" />
|
||||
<Import Project="targets\Branding.targets" />
|
||||
<Import Project="targets\BundledTemplates.targets" />
|
||||
<Import Project="targets\BundledDotnetTools.targets" />
|
||||
|
|
|
@ -414,25 +414,12 @@
|
|||
ReplacementStrings="$(ReplacementString)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateVersionFile" DependsOnTargets="SetupBundledComponents">
|
||||
<Exec Command="git rev-parse HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitCommitHash)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
|
||||
</Exec>
|
||||
|
||||
<Target Name="GenerateVersionFile" DependsOnTargets="SetupBundledComponents;GetCommitHash">
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory).version"
|
||||
Lines="$(GitCommitHash);$(Version);$(Rid)"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateFullNuGetVersion">
|
||||
<PropertyGroup>
|
||||
<FullNugetVersion>$(VersionPrefix)-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</FullNugetVersion>
|
||||
<FullNugetVersion Condition=" '$(VersionSuffixDateStamp)' != '' And '$(VersionSuffixBuildOfTheDay)' != '' ">$(FullNugetVersion).$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay)</FullNugetVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutAppHostTemplate" DependsOnTargets="RunResolvePackageDependencies">
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
16
src/redist/targets/Versions.targets
Normal file
16
src/redist/targets/Versions.targets
Normal file
|
@ -0,0 +1,16 @@
|
|||
<Project>
|
||||
<Target Name="GenerateFullNuGetVersion">
|
||||
<PropertyGroup>
|
||||
<FullNugetVersion>$(VersionPrefix)-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</FullNugetVersion>
|
||||
<FullNugetVersion Condition=" '$(VersionSuffixDateStamp)' != '' And '$(VersionSuffixBuildOfTheDay)' != '' ">$(FullNugetVersion).$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay)</FullNugetVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GetCommitHash">
|
||||
<Exec Command="git rev-parse HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitCommitHash)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
|
||||
</Exec>
|
||||
</Target>
|
||||
</Project>
|
Loading…
Reference in a new issue