migrate version calculations from release/16.9 (#10479)

This commit is contained in:
Brett V. Forsgren 2020-11-16 16:42:07 -08:00 коммит произвёл nosami
Родитель 11daaf5e8c
Коммит 04cd4ea27b
5 изменённых файлов: 48 добавлений и 6 удалений

Просмотреть файл

@ -204,6 +204,16 @@ stages:
continueOnError: true
condition: failed()
# Mock official build
- job: MockOfficial
pool:
vmImage: windows-2019
steps:
- checkout: self
clean: true
- pwsh: .\eng\MockBuild.ps1
displayName: Build with OfficialBuildId
# Linux
- job: Linux
pool:
@ -276,7 +286,7 @@ stages:
- checkout: self
clean: true
- script: .\Build.cmd -c Release
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests -c Release
- script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release
displayName: End to end build tests
# Source Build Linux - disabled until MSBuild/NuGet issues are resolved

15
eng/MockBuild.ps1 Normal file
Просмотреть файл

@ -0,0 +1,15 @@
Set-StrictMode -version 2.0
$ErrorActionPreference = "Stop"
try {
$fakeBuildId = (Get-Date -Format "yyyyMMdd") + ".0"
$visualStudioDropName = "Products/mock/dotnet-fsharp/branch/$fakeBuildId"
& "$PSScriptRoot\Build.ps1" -build -restore -ci -bootstrap -binaryLog -pack -configuration Release /p:OfficialBuildId=$fakeBuildId /p:VisualStudioDropName=$visualStudioDropName
}
catch {
Write-Host $_
Write-Host $_.Exception
Write-Host $_.ScriptStackTrace
Write-Host "##[error](NETCORE_ENGINEERING_TELEMETRY=Build) Error doing mock official build."
exit 1
}

Просмотреть файл

@ -12,17 +12,21 @@
<!-- Version number computation -->
<PropertyGroup>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<!-- F# Version components -->
<FSMajorVersion>5</FSMajorVersion>
<FSMinorVersion>0</FSMinorVersion>
<FSBuildVersion>0</FSBuildVersion>
<FSBuildVersion>1</FSBuildVersion>
<FSRevisionVersion>0</FSRevisionVersion>
<!-- F# Language version -->
<FSLanguageVersion>$(FSMajorVersion).$(FSMinorVersion)</FSLanguageVersion>
<FSLanguageReleaseNotesVersion>$(FSMajorVersion)-$(FSMinorVersion)</FSLanguageReleaseNotesVersion>
<!-- FSharp.Core version -->
<FSCoreProductVersion>$(FSMajorVersion).$(FSMinorVersion)</FSCoreProductVersion>
<FSCorePackageVersion>$(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion)</FSCorePackageVersion>
<FSCoreReleaseNotesVersion>$(FSMajorVersion)-$(FSMinorVersion)-$(FSBuildVersion)</FSCoreReleaseNotesVersion>
<FSCoreVersionPrefix>$(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion)</FSCoreVersionPrefix>
<FSCoreVersion>$(FSMajorVersion).$(FSMinorVersion).$(FSBuildVersion).$(FSRevisionVersion)</FSCoreVersion>
<FSCoreVersion>$(FSMajorVersion).$(FSMinorVersion).0.0</FSCoreVersion>
<!-- FSharp.Compiler.Service version -->
<FCSMajorVersion>38</FCSMajorVersion>
<FCSMinorVersion>$(FSMinorVersion)</FCSMinorVersion>
<FCSBuildVersion>$(FSBuildVersion)</FCSBuildVersion>
@ -49,13 +53,16 @@
<VSAssemblyVersion>$(VSAssemblyVersionPrefix).0</VSAssemblyVersion>
</PropertyGroup>
<!-- version number assignment -->
<PropertyGroup>
<PropertyGroup Condition="'$(UseFSharpPackageVersion)' == 'true'">
<VersionPrefix>$(FSCoreVersionPrefix)</VersionPrefix>
<AssemblyVersion>$(FSCoreVersion)</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(UseFSharpPackageVersion)' != 'true'">
<VersionPrefix>$(FSCoreVersionPrefix)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpPackageVersion)' == 'true'">$(FSCorePackageVersion)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersionPrefix)</VersionPrefix>
<VersionPrefix Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersionPrefix)</VersionPrefix>
<VersionPrefix Condition="'$(UseFSharpCompilerServiceVersion)' == 'true'">$(FSharpCompilerServicePackageVersion)</VersionPrefix>
<AssemblyVersion Condition="'$(OfficialBuildId)' == ''">$(VersionPrefix).0</AssemblyVersion>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
<!-- PR builds should explicitly specify a version number -->
</PropertyGroup>
<PropertyGroup>

Просмотреть файл

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<UseFSharpPackageVersion>true</UseFSharpPackageVersion>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

Просмотреть файл

@ -22,6 +22,7 @@
<PreRelease>true</PreRelease>
<PackageId>FSharp.Core</PackageId>
<PackageVersionPrefix>$(FSCorePackageVersion)</PackageVersionPrefix>
<NuspecFile>FSharp.Core.nuspec</NuspecFile>
<IsPackable>true</IsPackable>
<PackageDescription>FSharp.Core redistributables from F# Tools version $(FSCorePackageVersion) For F# $(FSLanguageVersion). Contains code from the F# Software Foundation.</PackageDescription>