Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita07ae6e

Browse files
authored
Merge pull request #5356 from Microsoft/vs-version-params
clean up version number computation
2 parents6014fe2 +2ebf674 commita07ae6e

File tree

6 files changed

+13
-65
lines changed

6 files changed

+13
-65
lines changed

‎build/targets/AssemblyVersions.props‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup>
44
<!-- Put build number 0 and today's date if this was a local build-->
55
<BUILD_BUILDNUMBERCondition="'$(BUILD_BUILDNUMBER)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd.0))</BUILD_BUILDNUMBER>
6+
<!-- Remove '.DRAFT' suffix if it exists-->
7+
<BUILD_BUILDNUMBER>$(BUILD_BUILDNUMBER.Replace(".DRAFT", ""))</BUILD_BUILDNUMBER>
68

79
<!--
810
Given $(BUILD_BUILDNUMBER) = '20161225.1'
@@ -22,7 +24,10 @@
2224
<FSCoreVersion>4.4.3.0</FSCoreVersion>
2325
<FSProductVersion>10.1.1.0</FSProductVersion>
2426
<FSPackageVersion>10.1.4</FSPackageVersion>
25-
<VSAssemblyVersion>15.7.0.0</VSAssemblyVersion>
27+
<VSMajorVersion>15</VSMajorVersion>
28+
<VSMinorVersion>7</VSMinorVersion>
29+
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
30+
<VSAssemblyVersion>$(VSMajorVersion).$(VSMinorVersion).0.0</VSAssemblyVersion>
2631
<MicroBuildAssemblyVersionCondition="'$(MicroBuildAssemblyVersion)' == ''">$(FSCoreVersion)</MicroBuildAssemblyVersion>
2732

2833
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion-->

‎setup/FSharp.Setup.props‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,8 @@
1313
<ImportProject="$(MSBuildThisFileDirectory)..\build\targets\AssemblyVersions.props" />
1414

1515
<PropertyGroup>
16-
<!-- This number should only be two parts, e.g., '15.6'.-->
17-
<FSharpProductVersion>$(VSAssemblyVersion.Split('.')[0]).$(VSAssemblyVersion.Split('.')[1])</FSharpProductVersion>
18-
<!-- BUILD_BUILDNUMBER is passed from Microbuild. Replace by today's date and (0) if it was a local build-->
19-
<BUILD_BUILDNUMBERCondition="'$(BUILD_BUILDNUMBER)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd.0))</BUILD_BUILDNUMBER>
20-
<!-- Remove .DRAFT suffix if it exists in the build number-->
21-
<FSharpPackageVersion>$(FSharpProductVersion).$(BUILD_BUILDNUMBER.Replace(".DRAFT", ""))</FSharpPackageVersion>
22-
<!-- FSharpPackageVersion should be {F# version}.{today's date}.{build number}. Example: 15.6.20160901.3-->
16+
<!-- FSharpPackageVersion should be {VS version}.{today's date}.{build number}. Example: 15.6.20160901.3-->
17+
<FSharpPackageVersion>$(VSMajorVersion).$(VSMinorVersion).$(BUILD_BUILDNUMBER)</FSharpPackageVersion>
2318
</PropertyGroup>
2419

2520
<PropertyGroup>

‎setup/Swix/Microsoft.FSharp.Dependencies/Files.swr‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use vs
33
package name=Microsoft.FSharp.Dependencies
44
version=$(FSharpPackageVersion)
55

6-
folder "InstallDir:MSBuild\Microsoft\VisualStudio\v15.0\FSharp"
6+
folder "InstallDir:MSBuild\Microsoft\VisualStudio\v$(VSGeneralVersion)\FSharp"
77
file "Microsoft.FSharp.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.Shim.targets"
88
file "Microsoft.Portable.FSharp.targets" source="$(BinariesFolder)\setup\resources\Microsoft.Portable.FSharp.Shim.targets"
99
file "Microsoft.FSharp.NetSdk.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.NetSdk.Shim.targets"

‎setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)</PackagePreprocessorDefinitions>
2222
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder)</PackagePreprocessorDefinitions>
2323
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion)</PackagePreprocessorDefinitions>
24+
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);VSGeneralVersion=$(VSGeneralVersion)</PackagePreprocessorDefinitions>
2425
</PropertyGroup>
2526

2627
<ItemGroup>
@@ -30,6 +31,7 @@
3031

3132
<TargetName="CheckPropertiesArePassed">
3233
<ErrorCondition="'$(FSharpPackageVersion)' == ''"Text="A 'FSharpPackageVersion' property must be passed to the project." />
34+
<ErrorCondition="'$(VSGeneralVersion)' == ''"Text="A 'VSGeneralVersion' property must be passed to the project." />
3335
</Target>
3436

3537
<TargetName="SignFiles">

‎setup/fsharp-setup-build.proj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
Properties="Configuration=$(Configuration);IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(VsixBuildLocation);DisableOutputPathCopying=true;$(CustomProps)" />
4646
<MSBuildProjects="%(SwixSetupProjects.ProjectPath)"
4747
Targets="Build"
48-
Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);$(CustomProps)"/>
48+
Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);VSGeneralVersion=$(VSGeneralVersion);$(CustomProps)"/>
4949
</Target>
5050

5151
<TargetName="CopyLocalizationResources"BeforeTargets="Build">

‎src/FSharpSource.Settings.targets‎

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -18,61 +18,7 @@
1818
<ConfigurationGroupCondition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
1919
</PropertyGroup>
2020

21-
<!-- Version number computation-->
22-
<PropertyGroup>
23-
<FSCoreVersion>4.4.3.0</FSCoreVersion>
24-
<FSProductVersion>10.1.1.0</FSProductVersion>
25-
<FSPackageVersion>10.1.4</FSPackageVersion>
26-
<VSAssemblyVersion>15.7.0.0</VSAssemblyVersion>
27-
</PropertyGroup>
28-
29-
<PropertyGroup>
30-
<!-- Put build number 0 and today's date if this was a local build-->
31-
<BUILD_BUILDNUMBERCondition="'$(BUILD_BUILDNUMBER)' == ''">$([System.DateTime]::Now.ToString(yyyyMMdd.0))</BUILD_BUILDNUMBER>
32-
33-
<!--
34-
Given $(BUILD_BUILDNUMBER) = '20161225.1'
35-
36-
Then $(_Build_Year) = 2016
37-
Then $(_Build_Month) = 12
38-
Then $(_Build_Day) = 25
39-
Then $(_Build_Number) = 1
40-
Then $(Build_FileVersion) = 2016.12.25.1
41-
-->
42-
<_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4))</_Build_Year>
43-
<_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2))</_Build_Month>
44-
<_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2))</_Build_Day>
45-
<_Build_Number>$(BUILD_BUILDNUMBER.Substring(9))</_Build_Number>
46-
<Build_FileVersion>$(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number)</Build_FileVersion>
47-
48-
<MicroBuildAssemblyVersionCondition="'$(MicroBuildAssemblyVersion)' == ''">$(FSCoreVersion)</MicroBuildAssemblyVersion>
49-
50-
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion-->
51-
<MicroBuildAssemblyVersionCondition="'$(UseFSharpProductVersion)' == 'true'">$(FSProductVersion)</MicroBuildAssemblyVersion>
52-
53-
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion-->
54-
<MicroBuildAssemblyVersionCondition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">$(VSAssemblyVersion)</MicroBuildAssemblyVersion>
55-
56-
<!--
57-
58-
Given $(BUILD_BUILDNUMBER) = '20161225.1'
59-
Given $(MicroBuildAssemblyVersion) = '15.4.1.0'
60-
61-
Then $(BuildTimeStamp_Date) = 161225
62-
Then $(BuildTimeStamp_Number) = 01
63-
Then $(BuildTimeStamp) = 16122501
64-
Then $(MicroBuildAssemblyVersion_WithoutRevision) = 15.4.1
65-
Then $(VsixPackageVersion) = 15.4.1.16122501
66-
Then $(NuGetPackageVersionSuffix) = 161225-01
67-
68-
-->
69-
<BuildTimeStamp_Date>$(BUILD_BUILDNUMBER.Split('.')[0].Substring(2))</BuildTimeStamp_Date>
70-
<BuildTimeStamp_Number>$(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0'))</BuildTimeStamp_Number>
71-
<BuildTimeStamp>$(BuildTimeStamp_Date)$(BuildTimeStamp_Number)</BuildTimeStamp>
72-
<MicroBuildAssemblyVersion_WithoutRevision>$(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.'))))</MicroBuildAssemblyVersion_WithoutRevision>
73-
<VsixPackageVersion>$(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp)</VsixPackageVersion>
74-
<NuGetPackageVersionSuffix>$(BuildTimeStamp_Date)-$(BuildTimeStamp_Number)</NuGetPackageVersionSuffix>
75-
</PropertyGroup>
21+
<ImportProject="..\build\targets\AssemblyVersions.props" />
7622

7723
<PropertyGroup>
7824
<!-- Settings used all the time-->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp